Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/locally-in-command/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ test-command-in-sub-dir:
RUN touch /this-file-exists-locally
DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test
RUN test "$(cat /the-test/data)" = "I am running in /the-test"
DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test --should-fail=true

# cleanup
RUN rm /the-test/data
Expand Down
5 changes: 1 addition & 4 deletions tests/locally-in-command/target-that-calls-command.earth
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ test:
FROM alpine
RUN ! test -f /this-file-exists-locally
DO imported-name+UDC_THAT_SAVES_FILE_LOCALLY
# at this point the command will have switched this to LOCALLY rather than the alpine-container
RUN test "$(cat data)" = "I am running in /the-test"
RUN test -f /this-file-exists-locally

Expand All @@ -14,7 +15,3 @@ test-other:
test-both:
BUILD +test
BUILD ./other/path+test

test-fails:
FROM alpine
DO imported-name+UDC_THAT_SAVES_FILE_LOCALLY
2 changes: 1 addition & 1 deletion tests/locally-in-function/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ test-function-in-sub-dir:
COPY target-that-calls-function.earth /the-test/Earthfile
COPY other-target-that-calls-function.earth /the-test/other/path/Earthfile
RUN touch /this-file-exists-locally
# at this point the command will have switched this to LOCALLY rather than the alpine-container
DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test
RUN test "$(cat /the-test/data)" = "I am running in /the-test"
DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test --should-fail=true

# cleanup
RUN rm /the-test/data
Expand Down
4 changes: 0 additions & 4 deletions tests/locally-in-function/target-that-calls-function.earth
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ test-other:
test-both:
BUILD +test
BUILD ./other/path+test

test-fails:
FROM alpine
DO imported-name+FUNCTION_THAT_SAVES_FILE_LOCALLY