add test instrumentation
parent
10bf635cdf
commit
7ea24fffb5
@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env bb
|
||||
|
@ -1,32 +1,40 @@
|
||||
(ns dda.devops-build.devops.domain-test
|
||||
(:require
|
||||
[clojure.test :refer [deftest is are testing run-tests]]
|
||||
[clojure.spec.test.alpha :as st]
|
||||
[dda.devops-build.devops.domain :as cut]))
|
||||
|
||||
(st/instrument `cut/build-path)
|
||||
(st/instrument `cut/create-build-dir-command)
|
||||
|
||||
(deftest should-calculate-build-path
|
||||
(is (= "../../target/dda-backup"
|
||||
(cut/build-path {:name "dda-backup"
|
||||
:project-root-path "../.."
|
||||
:build-dir-name "target"
|
||||
:version "4.11.8-dev"})))
|
||||
:version "4.11.8-dev"
|
||||
:stage "dev"})))
|
||||
(is (= "../../target/dda/backup"
|
||||
(cut/build-path {:name "dda"
|
||||
:module "backup"
|
||||
:project-root-path "../.."
|
||||
:build-dir-name "target"
|
||||
:version "4.11.8-dev"}))))
|
||||
:version "4.11.8-dev"
|
||||
:stage "dev"}))))
|
||||
|
||||
(deftest should-calculate-clean-build-dir-command
|
||||
(is (= ["rm" "-rf" "../../target/dda-backup"]
|
||||
(cut/clean-build-dir-command {:name "dda-backup"
|
||||
:project-root-path "../.."
|
||||
:build-dir-name "target"
|
||||
:version "4.11.8-dev"}))))
|
||||
:version "4.11.8-dev"
|
||||
:stage "dev"}))))
|
||||
|
||||
(deftest should-calculate-create-build-dir-command
|
||||
(is (= ["mkdir" "-p" "../../target/dda-backup"]
|
||||
(cut/create-build-dir-command {:name "dda-backup"
|
||||
:project-root-path "../.."
|
||||
:build-dir-name "target"
|
||||
:version "4.11.8-dev"}))))
|
||||
:project-root-path "../.."
|
||||
:build-dir-name "target"
|
||||
:version "4.11.8-dev"
|
||||
:stage "dev"}))))
|
||||
|
||||
|
Loading…
Reference in New Issue