From 9448fba997a244d242ebb0413b890d5db540ff03 Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Fri, 3 Sep 2021 02:28:35 +0200 Subject: [PATCH] Fix structural cycle error Signed-off-by: Guillaume de Rouville --- stdlib/git/tests/commit/commit.cue | 42 +++++++++--------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/stdlib/git/tests/commit/commit.cue b/stdlib/git/tests/commit/commit.cue index b460ab30..90908c5b 100644 --- a/stdlib/git/tests/commit/commit.cue +++ b/stdlib/git/tests/commit/commit.cue @@ -3,7 +3,6 @@ package git import ( "alpha.dagger.io/alpine" "alpha.dagger.io/dagger" - "alpha.dagger.io/dagger/op" "alpha.dagger.io/os" "alpha.dagger.io/random" ) @@ -25,32 +24,17 @@ TestData: { } }.out -// FIXME Currently throw a structural cycle error -//TestFile: os.#Dir & { -// from: os.#Container & { -// image: alpine.#Image -// command: #""" -// mkdir -p /output -// echo "$MESSAGE" >> /output/test.md -// """# -// env: MESSAGE: TestData -// } -// path: "/output" -//} - -TestFile: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Mkdir & { - path: "/output" - }, - op.#WriteFile & { - content: TestData - dest: "/output/test.md" - }, - op.#Subdir & { - dir: "/output" - }, -] +TestFile: os.#Dir & { + from: os.#Container & { + image: alpine.#Image + command: #""" + mkdir -p /output + echo "$MESSAGE" >> /output/test.md + """# + env: MESSAGE: TestData + } + path: "/output" +} TestCommit: #Commit & { repository: { @@ -88,8 +72,8 @@ TestCheck: { mount: "/input/repo": from: _TestRepo env: { EXPECTED_MESSAGE: TestData - // Force dependency - GIT_HASH: TestCommit.hash + // Force dependency with interpolation + GIT_HASH: "\(TestCommit.hash)" } } }