-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Eric's e2e test change to get more coverage
- Loading branch information
Aiqiao Yan
authored and
Aiqiao Yan
committed
May 12, 2020
1 parent
0232e31
commit 3f662ca
Showing
7 changed files
with
143 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
# Validate args | ||
prefix="$1" | ||
if [ -z "$prefix" ]; then | ||
echo "Must supply prefix argument" | ||
exit 1 | ||
fi | ||
|
||
mkdir test-cache | ||
echo "$prefix $GITHUB_RUN_ID" > test-cache/test-file.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
# Validate args | ||
prefix="$1" | ||
if [ -z "$prefix" ]; then | ||
echo "Must supply prefix argument" | ||
exit 1 | ||
fi | ||
|
||
# Sanity check GITHUB_RUN_ID defined | ||
if [ -z "$GITHUB_RUN_ID" ]; then | ||
echo "GITHUB_RUN_ID not defined" | ||
exit 1 | ||
fi | ||
|
||
# Verify file exists | ||
file="test-cache/test-file.txt" | ||
echo "Checking for $file" | ||
if [ ! -e $file ]; then | ||
echo "File does not exist" | ||
exit 1 | ||
fi | ||
|
||
# Verify file content | ||
content="$(cat $file)" | ||
echo "File content:\n$content" | ||
if [ -z "$(echo $content | grep --fixed-strings "$prefix $GITHUB_RUN_ID")" ]; then | ||
echo "Unexpected file content" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters