Skip to content

Instantly share code, notes, and snippets.

@kbarber
Created July 31, 2014 23:41
Show Gist options
  • Save kbarber/17b1748831b234e7b835 to your computer and use it in GitHub Desktop.
Save kbarber/17b1748831b234e7b835 to your computer and use it in GitHub Desktop.
lein test :only com.puppetlabs.puppetdb.test.http.facts/factset-queries
FAIL in (factset-queries) (facts.clj:892)
Testing version :v4 factset queries should return appropriate results
expected: (= (into {} (first responses)) {"facts" {"my_structured_fact" {"a" 1, "b" 3.14, "c" ["a" "b" "c"], "d" {"n" ""}, "e" "1", "f" nil}, "domain" "testing.com", "uptime_seconds" "4000", "test#~delimiter" "foo"}, "timestamp" (to-string current-time), "environment" "DEV", "certname" "foo1"})
actual: (not (= {"facts" {"test#~delimiter" "foo", "uptime_seconds" "4000", "domain" "testing.com", "my_structured_fact" {"b" 3.14, "a" 1, "e" "1", "d" {"n" ""}, "f" nil, "c" ["a" "b" "c"]}}, "timestamp" "2014-07-31T23:27:45.298Z", "environment" "DEV", "certname" "foo1"} {"facts" {"uptime_seconds" "4000", "domain" "testing.com", "test#~delimiter" "foo", "my_structured_fact" {"d" {"n" ""}, "f" nil, "e" "1", "a" 1, "b" 3.14, "c" ["a" "b" "c"]}}, "timestamp" "2014-07-31T23:27:45.297Z", "environment" "DEV", "certname" "foo1"}))
lein test :only com.puppetlabs.puppetdb.test.http.facts/factset-queries
FAIL in (factset-queries) (facts.clj:906)
Testing version :v4 factset queries should return appropriate results
expected: (= (into [] (nth responses 1)) [{"facts" {"my_structured_fact" {"a" 1, "b" 3.14, "c" ["a" "b" "c"], "d" {"n" ""}, "e" "1", "f" nil}, "domain" "testing.com", "uptime_seconds" "4000", "test#~delimiter" "foo"}, "timestamp" (to-string current-time), "environment" "DEV", "certname" "foo1"} {"facts" {"my_structured_fact" {"a" 1, "b" 3.14, "c" ["a" "b" "c"], "d" {"n" ""}, "e" "1"}, "domain" "testing.com", "uptime_seconds" "6000"}, "timestamp" (to-string (to-timestamp "2013-01-01")), "environment" "DEV", "certname" "foo2"}])
actual: (not (= [{"facts" {"uptime_seconds" "4000", "test#~delimiter" "foo", "my_structured_fact" {"c" ["a" "b" "c"], "d" {"n" ""}, "b" 3.14, "f" nil, "e" "1", "a" 1}, "domain" "testing.com"}, "timestamp" "2014-07-31T23:27:45.298Z", "environment" "DEV", "certname" "foo1"} {"facts" {"uptime_seconds" "6000", "my_structured_fact" {"c" ["a" "b" "c"], "d" {"n" ""}, "b" 3.14, "e" "1", "a" 1}, "domain" "testing.com"}, "timestamp" "2013-01-01T00:00:00.000Z", "environment" "DEV", "certname" "foo2"}] [{"facts" {"uptime_seconds" "4000", "domain" "testing.com", "test#~delimiter" "foo", "my_structured_fact" {"d" {"n" ""}, "f" nil, "e" "1", "a" 1, "b" 3.14, "c" ["a" "b" "c"]}}, "timestamp" "2014-07-31T23:27:45.297Z", "environment" "DEV", "certname" "foo1"} {"facts" {"uptime_seconds" "6000", "domain" "testing.com", "my_structured_fact" {"d" {"n" ""}, "e" "1", "a" 1, "b" 3.14, "c" ["a" "b" "c"]}}, "timestamp" "2013-01-01T00:00:00.000Z", "environment" "DEV", "certname" "foo2"}]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment