Skip to content

Commit

Permalink
make it obvious when the confit test passes (#3451)
Browse files Browse the repository at this point in the history
The final stage of the config-test is to check for an error case (via
grep), this causes the last line to be output as:

./tests/config+test | --> RUN cat output.txt | grep 'Error: read config:
failed to read from /home/testuser/.earthly/config.yml: open
/home/testuser/.earthly/config.yml: permission denied'
./tests/config+test | Error: read config: failed to read from
/home/testuser/.earthly/config.yml: open
/home/testuser/.earthly/config.yml: permission denied

which is not obvious at a quick glance.

Now we will print a final "config test passed" line.

Signed-off-by: Alex Couture-Beil <[email protected]>
  • Loading branch information
alexcb authored Nov 3, 2023
1 parent 86e1548 commit 3521397
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/config/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ test:
RUN ! earthly --verbose +hello > output.txt 2>&1
RUN cat output.txt | grep 'Error: read config: failed to read from /home/testuser/.earthly/config.yml: open /home/testuser/.earthly/config.yml: permission denied'

# make it obvious that this test passed, due to the previous grep displaying "Error: ..." when it passes
RUN echo "config test passed"


RUN_EARTHLY_ARGS:
COMMAND
Expand Down

0 comments on commit 3521397

Please sign in to comment.