implement-c4k-and-provs #1

Merged
bom merged 17 commits from implement-c4k-and-provs into main 2024-10-18 09:22:48 +00:00
2 changed files with 25 additions and 8 deletions
Showing only changes of commit b6814110cb - Show all commits

View file

@ -4,7 +4,7 @@
[dda.build.devops.domain :as d]
[dda.c4k-common.predicate :as pred]))
(s/def ::c4k-output-filenname string?)
(s/def ::c4k-output-filename string?)
(s/def ::autoapply boolean?)
(s/def ::sensitive boolean?)
@ -28,7 +28,7 @@
(s/def ::config
(s/keys :req-un [::d/name ::d/stage ::d/project-root-path ::d/build-dir-name ::d/debug
::d/dry-run ::d/module ::c4k-output-filenname ::autoapply ::c4k-config-filename ::c4k-auth-filename]
::d/dry-run ::d/module ::c4k-output-filename ::autoapply ::c4k-config-filename ::c4k-auth-filename]
:opt-un []))
(defn-spec config-path string?

View file

@ -4,8 +4,13 @@
[clojure.spec.test.alpha :as st]
[dda.build.c4k.domain :as cut]))
(st/instrument `cut/build-path)
(st/instrument `cut/create-build-dir-command)
(st/instrument `cut/config-path)
(st/instrument `cut/auth-path)
(st/instrument `cut/output-path)
(st/instrument `cut/clean-build-dir-command)
(st/instrument `cut/c4k-uberjar-command)
(st/instrument `cut/c4k-graalvm-command)
(st/instrument `cut/create-c4k-config)
(deftest should-calculate-config-path
(is (= "../../target/dda-backup/config.yaml"
@ -16,7 +21,9 @@
:stage "dev"
:debug false
:dry-run false
:c4k-config-filename "config.yaml"})))
:c4k-config-filename "config.yaml"
:c4k-auth-filename "auth.yaml"
:c4k-output-filename "out.yaml"})))
(is (= "../../target/dda/backup/config.yaml"
(cut/config-path {:name "dda"
:module "backup"
@ -26,7 +33,9 @@
:stage "dev"
:debug false
:dry-run false
:c4k-config-filename "config.yaml"}))))
:c4k-config-filename "config.yaml"
:c4k-auth-filename "auth.yaml"
:c4k-output-filename "out.yaml"}))))
(deftest should-calculate-auth-path
(is (= "../../target/dda-backup/auth.yaml"
@ -37,7 +46,9 @@
:stage "dev"
:debug false
:dry-run false
:c4k-auth-filename "auth.yaml"})))
:c4k-config-filename "config.yaml"
:c4k-auth-filename "auth.yaml"
:c4k-output-filename "out.yaml"})))
(is (= "../../target/dda/backup/auth.yaml"
(cut/auth-path {:name "dda"
:module "backup"
@ -47,7 +58,9 @@
:stage "dev"
:debug false
:dry-run false
:c4k-auth-filename "auth.yaml"}))))
:c4k-config-filename "config.yaml"
:c4k-auth-filename "auth.yaml"
:c4k-output-filename "out.yaml"}))))
(deftest should-calculate-output-path
@ -59,6 +72,8 @@
:stage "dev"
:debug false
:dry-run false
:c4k-config-filename "config.yaml"
:c4k-auth-filename "auth.yaml"
:c4k-output-filename "out.yaml"})))
(is (= "../../target/dda/backup/out.yaml"
(cut/output-path {:name "dda"
@ -69,6 +84,8 @@
:stage "dev"
:debug false
:dry-run false
:c4k-config-filename "config.yaml"
:c4k-auth-filename "auth.yaml"
:c4k-output-filename "out.yaml"}))))
(deftest should-calculate-clean-build-dir-command