[PDB-1017] Node tests broken due to bug in assertion code Created: 2014/11/06  Updated: 2015/11/30  Resolved: 2014/11/19

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 2.3.0

Type: Bug Priority: Normal
Reporter: Ryan Senior Assignee: Ryan Senior
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 1
Sprint: PuppetDB 2014-12-03


While looking into another issue, I found two issues related to our node-query tests, specifically here: https://github.com/puppetlabs/puppetdb/blob/master/test/puppetlabs/puppetdb/http/nodes_test.clj#L65. There are tests in that namespace that actually generate incorrect SQL, I see a stacktrace in standard error, but the error isn't returned and PuppetDB is actually responding with a 200 and an empty body. The empty body causes the doseq above to be skipped, and since the response is 200, the test runs successfully, even though there was a failure and no results were returned.

We should also look into our bad handling of this failed query. Ideally it should be returning a 4xx error, but certainly shouldn't return a 200.

Generated at Sun Jul 12 23:25:15 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.