(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" :stage "dev" :debug false :dry-run false})))) (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" :stage "dev" :debug false :dry-run false}))))