|
1 | 1 | (ns bb-test-runner |
2 | 2 | (:require [clojure.test :as t] |
3 | | - [cognitect.aws.api-test] |
4 | | - [cognitect.aws.client.shared-test] |
5 | | - [cognitect.aws.config-test] |
6 | | - [cognitect.aws.credentials-test] |
7 | | - [cognitect.aws.ec2-metadata-utils-test] |
8 | | - [cognitect.aws.endpoint-test] |
9 | | - [cognitect.aws.http-test] |
10 | | - [cognitect.aws.http.java-test] |
11 | | - [cognitect.aws.integration.error-codes-test] |
12 | | - [cognitect.aws.integration.s3-test] |
13 | | - [cognitect.aws.interceptors-test] |
14 | | - [cognitect.aws.protocols-test] |
15 | | - [cognitect.aws.protocols.rest-test] |
16 | | - [cognitect.aws.region-test] |
17 | | - [cognitect.aws.retry-test] |
18 | | - [cognitect.aws.shape-test] |
19 | | - [cognitect.aws.util-test] |
20 | | - [cognitect.client.impl-test])) |
| 3 | + [clojure.edn :as edn])) |
| 4 | + |
| 5 | +; Load dev dependencies from deps.edn |
| 6 | +(require '[babashka.deps :as deps]) |
| 7 | +(deps/add-deps (edn/read-string (slurp "deps.edn")) |
| 8 | + {:aliases [:dev]}) |
21 | 9 |
|
22 | 10 | ; NOTE: some tests won't run in babashka: |
23 | 11 | ; cognitect.aws.http.default-test - all reify instances start with `babashka.impl.reify`, test won't pass |
24 | 12 | ; cognitect.aws.signers-test - requires loading AWS SDK, which is not supported (no Java libs) |
25 | 13 | ; cognitect.client.test-double-test - test double not supported in babashka |
| 14 | +(def test-namespaces |
| 15 | + ['cognitect.aws.api-test |
| 16 | + 'cognitect.aws.client.shared-test |
| 17 | + 'cognitect.aws.config-test |
| 18 | + 'cognitect.aws.credentials-test |
| 19 | + 'cognitect.aws.ec2-metadata-utils-test |
| 20 | + 'cognitect.aws.endpoint-test |
| 21 | + 'cognitect.aws.http-test |
| 22 | + 'cognitect.aws.http.java-test |
| 23 | + 'cognitect.aws.integration.error-codes-test |
| 24 | + 'cognitect.aws.integration.s3-test |
| 25 | + 'cognitect.aws.interceptors-test |
| 26 | + 'cognitect.aws.protocols-test |
| 27 | + 'cognitect.aws.protocols.rest-test |
| 28 | + 'cognitect.aws.region-test |
| 29 | + 'cognitect.aws.retry-test |
| 30 | + 'cognitect.aws.shape-test |
| 31 | + 'cognitect.aws.util-test |
| 32 | + 'cognitect.client.impl-test]) |
26 | 33 |
|
27 | 34 | (defn run-tests [& _args] |
28 | | - (let [{:keys [fail error] :as a} |
29 | | - (t/run-tests |
30 | | - 'cognitect.aws.api-test |
31 | | - 'cognitect.aws.client.shared-test |
32 | | - 'cognitect.aws.config-test |
33 | | - 'cognitect.aws.credentials-test |
34 | | - 'cognitect.aws.ec2-metadata-utils-test |
35 | | - 'cognitect.aws.endpoint-test |
36 | | - 'cognitect.aws.http-test |
37 | | - 'cognitect.aws.http.java-test |
38 | | - 'cognitect.aws.integration.error-codes-test |
39 | | - 'cognitect.aws.integration.s3-test |
40 | | - 'cognitect.aws.interceptors-test |
41 | | - 'cognitect.aws.protocols-test |
42 | | - 'cognitect.aws.protocols.rest-test |
43 | | - 'cognitect.aws.region-test |
44 | | - 'cognitect.aws.retry-test |
45 | | - 'cognitect.aws.shape-test |
46 | | - 'cognitect.aws.util-test |
47 | | - 'cognitect.client.impl-test)] |
| 35 | + (apply require test-namespaces) |
| 36 | + |
| 37 | + (let [{:keys [fail error]} |
| 38 | + (apply t/run-tests test-namespaces)] |
48 | 39 | (when (or (pos? fail) |
49 | 40 | (pos? error)) |
50 | 41 | (System/exit 1)))) |
0 commit comments