From f038e11fc578dab91d29fb30c1272be10abf7da6 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Mon, 16 Aug 2021 16:51:05 +0200 Subject: [PATCH] Update argoCD test file to use `os.#Container` Signed-off-by: Tom Chauveau --- stdlib/argocd/tests/argocd.cue | 31 +++++++++++-------------------- stdlib/universe.bats | 4 ++-- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/stdlib/argocd/tests/argocd.cue b/stdlib/argocd/tests/argocd.cue index 260eb927..1af27a3f 100644 --- a/stdlib/argocd/tests/argocd.cue +++ b/stdlib/argocd/tests/argocd.cue @@ -3,7 +3,7 @@ package app import ( "alpha.dagger.io/argocd" "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" + "alpha.dagger.io/os" ) TestConfig: argocdConfig: argocd.#Config & { @@ -12,22 +12,13 @@ TestConfig: argocdConfig: argocd.#Config & { token: dagger.#Secret & dagger.#Input } -TestArgocd: #up: [ - // Initialize ArgoCD CLI binary - op.#Load & { - from: argocd.#CLI & { - config: TestConfig.argocdConfig - } - }, - - // Check the binary and its version - op.#Exec & { - args: [ - "sh", "-c", - #""" - argocd version --output json | jq -e 'all(.client.Version; startswith("$VERSION"))' - """#, - ] - env: VERSION: TestConfig.argocdConfig.version - }, -] +TestArgoCD2: os.#Container & { + image: argocd.#CLI & { + config: TestConfig.argocdConfig + } + always: true + command: #""" + argocd version --output json | jq -e 'all(.client.Version; startswith("$VERSION"))' + """# + env: VERSION: TestConfig.argocdConfig.version +} diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 95524a2f..f8cb4861 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -76,7 +76,7 @@ setup() { } @test "docker run: local" { - skip "Not implemented yet + missing inputs leading to failure" + skip "Not implemented yet + missing inputs leading to failure" # dagger -e docker-run-local up } @@ -217,6 +217,6 @@ setup() { @test "argocd" { - skip "ArgoCD CI secrets not yet generated" + skip "ArgoCD CI secrets not yet generated - Infra not implemented yet" #dagger -e argocd up }