File tree Expand file tree Collapse file tree 8 files changed +54
-10
lines changed
src/all/madek/media_service Expand file tree Collapse file tree 8 files changed +54
-10
lines changed Original file line number Diff line number Diff line change 33PROJECT_DIR=" $( cd -- " $( dirname " ${BASH_SOURCE} " ) " ; cd .. > /dev/null 2>&1 && pwd -P) "
44cd $PROJECT_DIR
55source $PROJECT_DIR /clojure/bin/activate
6- clj -M:test
6+ clojure -M:test " $@ "
Original file line number Diff line number Diff line change 11jobs :
22
3- build-media-service-uberjar :
4- name : Build media-service uberjar
3+ backend-unit-tests :
4+ name : Clojure Backend Unit Tests
55 run_when :
66 any branch has been updated :
77 type : branch
88 include_match : ^.*$
9+ context :
10+ task_defaults :
11+ environment_variables :
12+ MADEK_MEDIA_SERVICE_DIR : " {{CIDER_CI_WORKING_DIR}}"
13+ tasks :
14+ run-tests :
15+ name : Run backend clojure unit tests
16+ traits :
17+ JDK 8 : true
18+ scripts :
19+ run-tests :
20+ body : |
21+ ${MADEK_MEDIA_SERVICE_DIR}/bin/clj-test
22+
23+ build-media-service-uberjar :
24+ name : Build media-service uberjar
25+ depends_on : &UBERJAR_DEPENDS
26+ backend-unit-tests-passed :
27+ type : job
28+ job_key : backend-unit-tests
29+ states : [passed]
30+ run_when : *UBERJAR_DEPENDS
931 context :
1032 task_defaults :
1133 environment_variables :
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ git_options:
1010
1111traits :
1212 JDK 8 : true
13- Leiningen 2 : true
1413
1514environment_variables :
1615 NVM_NODEJS_VERSION : " 14"
Original file line number Diff line number Diff line change 6363 :main-opts [" -m" " depot.outdated.main" ]}
6464 :resources {:extra-paths [" resources" ]}
6565 :test {:extra-paths [" test" ]
66- :extra-deps {com. cognitect/test-runner
66+ :extra-deps {io.github. cognitect-labs /test-runner
6767 {:git/url " https://github.com/cognitect-labs/test-runner.git"
68- :sha " 4e7e1c0dfd5291fa2134df052443dc29695d8cbe" }}
69- :main-opts [" -m" " cognitect.test-runner" ]}}}
68+ :sha " dd6da11611eeb87f08780a30ac8ea6012d4c05ce" }}
69+ :main-opts [" -m" " cognitect.test-runner" ]
70+ :exec-fn cognitect.test-runner.api/test
71+ }}}
Original file line number Diff line number Diff line change 9090 flatten (into []))]
9191 (reset! options* options)
9292 (cond
93- (:help options) (println (main-usage summary {:args args :options options}))
93+ (:help options) (do
94+ (println (main-usage summary {:args args :options options})))
9495 :else (do (logging/info " run with options:" (str options ) )
9596 (.addShutdownHook (Runtime/getRuntime ) (Thread. #(shutdown )))
9697 (state/init )
Original file line number Diff line number Diff line change 55 ))
66
77(def fixed-signature
8- " 0caf649feee4953d87bf903ac1176c45e028df16" )
8+ " 0caf649feee4953d87bf903ac1176c45e028df16" )
99
1010(deftest fixed-valid?-test []
11- (is (= true (valid? fixed-signature " secret" " message" ))))
11+ (is (= true (valid? fixed-signature " secret" " message" ))))
Original file line number Diff line number Diff line change 1+ (ns madek.media-service.main-test
2+ (:require
3+ [clojure.test :refer :all ]
4+ [madek.media-service.main]
5+ ))
6+
7+ ; madek.media-service.main requires everything needed to run the backend starting
8+ ; from madek.media-service.main/-main
9+
10+
11+ (deftest main-entry-function-exists-test []
12+ (is (fn? madek.media-service.main/-main)))
13+
14+
15+ (deftest call-run-scope-with-help-opt-test []
16+ (let [run-scope-help (with-out-str
17+ (madek.media-service.main/-main
18+ " run" " --help" ))]
19+ (is (re-find #"Madek Media-Service" run-scope-help))
20+ (is (re-find #"usage" run-scope-help))))
You can’t perform that action at this time.
0 commit comments