dda-build/test/dda/build/image/domain_test.clj

37 lines
1.3 KiB
Clojure
Raw Normal View History

2024-07-26 15:46:51 +00:00
(ns dda.build.image.domain-test
(:require
[clojure.test :refer [deftest is are testing run-tests]]
[clojure.spec.test.alpha :as st]
[dda.build.image.domain :as cut]))
(st/instrument `cut/copy-image-command)
(st/instrument `cut/dbuild-command)
(deftest should-calculate-copy-image-command
(is (= ["cp" "-r" "image" "../../target/dda-backup"]
(cut/copy-image-command {:name "dda-backup"
:project-root-path "../.."
:build-dir-name "target"
:version "4.11.8-dev"
2024-07-27 14:31:54 +00:00
:stage "dev"
:debug false
:dry-run false}))))
2024-07-26 15:46:51 +00:00
(deftest should-calculate-dbuild-command
(is (= ["docker"
"build"
"-t"
"dda-backup"
"--file"
"../../target/dda-backup/image/Dockerfile"
"../../target/dda-backup/image"]
(cut/dbuild-command {:name "dda-backup"
:project-root-path "../.."
:build-dir-name "target"
:version "4.11.8-dev"
2024-07-27 14:31:54 +00:00
:stage "dev"
:debug false
:dry-run false}))))
2024-07-26 15:46:51 +00:00