diff --git a/resources/sys/proxy.pac/0.1.0/proxy.pac b/resources/sys/proxy.pac/0.1.0/proxy.pac new file mode 100644 index 0000000..e69de29 diff --git a/test/Handler/AppSpec.hs b/test/Handler/AppSpec.hs index b1b1b37..135ca8c 100644 --- a/test/Handler/AppSpec.hs +++ b/test/Handler/AppSpec.hs @@ -54,4 +54,21 @@ spec = do metrics <- runDBtest $ selectList [MetricAppId ==. entityKey app] [] assertEq "metric should exist" (length metrics) 1 version <- runDBtest $ selectList [VersionAppId ==. entityKey app] [] - assertEq "version should exist" (length version) 1 \ No newline at end of file + assertEq "version should exist" (length version) 1 + describe "GET /sys/proxy.pac" $ + withApp $ it "does not record metric but request successful" $ do + request $ do + setMethod "GET" + setUrl ("/sys/proxy.pac?spec=0.1.0" :: Text) + statusIs 200 + -- select * from s_app + apps <- runDBtest $ selectList ([] :: [Filter SApp])[] + assertEq "no apps should exist" (length apps) 0 + describe "GET /sys/:sysId" $ + withApp $ it "does not record metric but request successful" $ do + request $ do + setMethod "GET" + setUrl ("/sys/agent?spec=0.0.0" :: Text) + statusIs 200 + apps <- runDBtest $ selectList ([] :: [Filter SApp])[] + assertEq "no apps should exist" (length apps) 0 \ No newline at end of file