32 lines
1.6 KiB
Clojure
32 lines
1.6 KiB
Clojure
(ns dda.build.provs.domain-test
|
|
(:require
|
|
[clojure.test :refer [deftest is]]
|
|
[clojure.spec.test.alpha :as st]
|
|
[dda.build.provs.domain :as cut]))
|
|
|
|
(st/instrument `cut/output-path)
|
|
(st/instrument `cut/provs-server-command)
|
|
(st/instrument `cut/create-k3s-config)
|
|
|
|
(deftest should-calculate-provs-server-command
|
|
(is (= [["provs-server.jar" "k3s" "root@test.test.de" "-c" "../../target/dda-backup/k3s-out.yaml" "-a" "../../target/dda-backup/out.yaml"]]
|
|
(cut/provs-server-command {:name "dda-backup"
|
|
:project-root-path "../.."
|
|
:build-dir-name "target"
|
|
:version "4.11.8-dev"
|
|
:stage "dev"
|
|
:debug false
|
|
:dry-run false
|
|
:c4k-app-name "backup"
|
|
:k3s-output-filename "k3s-out.yaml"
|
|
:k3s-provision-user "root"
|
|
:c4k-config-input "config.yaml"
|
|
:c4k-auth-input"auth.yaml"
|
|
:c4k-output "out.yaml"
|
|
:email "test@test.t"
|
|
:echo false
|
|
:fqdn "fq.dn"
|
|
:ipv4 "1.2.3.4"
|
|
:ipv6 "2a01:4f8:c012:cb41::1"}
|
|
{:out {:sensitive false :type [] :value {:fqdn "test.test.de" :ipv4 "127.0.0.1" :ipv6 "::"}}}))))
|
|
|