File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed
src/codes/clj/docs/backend
test/integration/codes/clj/docs/backend Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ (ns codes.clj.docs.backend.ports.http-in.ops )
2
+
3
+ (defn health
4
+ [_]
5
+ {:status 200 :body " OK" })
Original file line number Diff line number Diff line change 1
1
(ns codes.clj.docs.backend.routes
2
2
(:require [codes.clj.docs.backend.interceptors :as backend.interceptors]
3
3
[codes.clj.docs.backend.ports.http-in.document :as ports.http-in.document]
4
+ [codes.clj.docs.backend.ports.http-in.ops :as ports.http-in.ops]
4
5
[codes.clj.docs.backend.ports.http-in.social :as ports.http-in.social]
5
6
[codes.clj.docs.backend.schemas.wire.in.social :as schemas.wire.in.social]
6
7
[codes.clj.docs.backend.schemas.wire.out.document :as schemas.wire.out.document]
15
16
:description " codes.clj.docs.backend" }}
16
17
:handler (swagger/create-swagger-handler )}}]
17
18
19
+ [" /ops"
20
+ {:swagger {:tags [" ops" ]}}
21
+
22
+ [" /health"
23
+ {:get {:summary " health check"
24
+ :responses {200 {:body :string }
25
+ 500 {:body :string }}
26
+ :handler ports.http-in.ops/health}}]]
27
+
18
28
[" /api"
19
29
20
30
[" /login"
Original file line number Diff line number Diff line change
1
+ (ns integration.codes.clj.docs.backend.ops-test
2
+ (:require [clojure.test :refer [use-fixtures]]
3
+ [integration.codes.clj.docs.backend.util :as util]
4
+ [parenthesin.helpers.malli :as helpers.malli]
5
+ [parenthesin.helpers.state-flow.server.pedestal :as state-flow.server]
6
+ [state-flow.api :refer [defflow flow]]
7
+ [state-flow.assertions.matcher-combinators :refer [match?]]))
8
+
9
+ (use-fixtures :once helpers.malli/with-intrumentation)
10
+
11
+ (defflow
12
+ flow-integration-ops-test
13
+ {:init util/start-system!
14
+ :cleanup util/stop-system!
15
+ :fail-fast? true }
16
+ (flow " should interact with system"
17
+ (flow " health check"
18
+ (match? {:status 200 :body " OK" }
19
+ (state-flow.server/request! {:method :get
20
+ :uri " /ops/health" })))))
You can’t perform that action at this time.
0 commit comments