diff --git a/src/puppetlabs/puppetdb/query/paging.clj b/src/puppetlabs/puppetdb/query/paging.clj index d9f8d502d..fb9c5a8d5 100644 --- a/src/puppetlabs/puppetdb/query/paging.clj +++ b/src/puppetlabs/puppetdb/query/paging.clj @@ -114,7 +114,7 @@ was successful; throws an exception with a useful error message otherwise." [order_by] (if-let [bad-order-by (some - (fn [x] (when (keys (dissoc x :field :order)) x)) + (fn [x] (when (seq (dissoc x :field :order)) x)) order_by)] (throw (bad-query-ex (tru "Illegal value ''{0}'' in :order_by; unknown key ''{1}''." diff --git a/src/puppetlabs/puppetdb/scf/storage.clj b/src/puppetlabs/puppetdb/scf/storage.clj index 152d3a82f..e75fb68f8 100644 --- a/src/puppetlabs/puppetdb/scf/storage.clj +++ b/src/puppetlabs/puppetdb/scf/storage.clj @@ -1980,7 +1980,7 @@ (s/defn add-report! :- processing-status-schema "Add a report and all of the associated events to the database." ([report received-timestamp db conn-status] - (add-report! report received-timestamp db conn-status true)) + (add-report! report received-timestamp db conn-status nil)) ([{:keys [certname producer_timestamp] :as report} :- reports/report-wireformat-schema received-timestamp :- pls/Timestamp db conn-status diff --git a/test/puppetlabs/puppetdb/catalogs_test.clj b/test/puppetlabs/puppetdb/catalogs_test.clj index f06943331..9883e1d7b 100644 --- a/test/puppetlabs/puppetdb/catalogs_test.clj +++ b/test/puppetlabs/puppetdb/catalogs_test.clj @@ -39,6 +39,7 @@ (is (thrown? AssertionError (resource-spec-to-map "Class[Foo"))) (is (thrown? AssertionError (resource-spec-to-map "ClassFoo]"))) (is (thrown? AssertionError (resource-spec-to-map "ClassFoo"))) + #_{:clj-kondo/ignore [:type-mismatch]} (is (thrown? AssertionError (resource-spec-to-map nil)))) (testing "should correctly parse well-formed input" diff --git a/test/puppetlabs/puppetdb/random_test.clj b/test/puppetlabs/puppetdb/random_test.clj index cfa465e75..53ee36bd1 100644 --- a/test/puppetlabs/puppetdb/random_test.clj +++ b/test/puppetlabs/puppetdb/random_test.clj @@ -28,6 +28,7 @@ (testing "should only accept a positive integer" (is (thrown? IllegalArgumentException (random-string -1))) + #_{:clj-kondo/ignore [:type-mismatch]} (is (thrown? ClassCastException (random-string "asdf"))))) (deftest test-random-string-alpha @@ -43,6 +44,7 @@ (testing "should only accept a positive integer" (is (thrown? IllegalArgumentException (random-string-alpha -1))) + #_{:clj-kondo/ignore [:type-mismatch]} (is (thrown? ClassCastException (random-string-alpha "asdf"))))) (deftest test-random-ascii-string @@ -56,6 +58,7 @@ (testing "should only accept a positive integer" (is (thrown? IllegalArgumentException (random-ascii-string -1))) + #_{:clj-kondo/ignore [:type-mismatch]} (is (thrown? ClassCastException (random-ascii-string "asdf"))))) (deftest test-random-bool diff --git a/test/puppetlabs/puppetdb/testutils/services.clj b/test/puppetlabs/puppetdb/testutils/services.clj index 56d864f74..c07296125 100644 --- a/test/puppetlabs/puppetdb/testutils/services.clj +++ b/test/puppetlabs/puppetdb/testutils/services.clj @@ -458,7 +458,7 @@ "Returns the number of messages discarded from the command queue by the current PuppetDB instance." [] - (-> (pdb-metrics-url "/mbeans/puppetlabs.puppetdb.command:type=global,name=discarded") + (-> (metrics-url-str "/mbeans/puppetlabs.puppetdb.command:type=global,name=discarded") get-or-throw (get-in [:body :Count])))