Skip to content

Commit

Permalink
fix left padding, rename log uploads, remove failure test
Browse files Browse the repository at this point in the history
Co-authored-by: Bob Callaway <bcallaway@google.com>
Co-authored-by: Fredrik Skogman <kommendorkapten@github.com>
  • Loading branch information
bobcallaway and kommendorkapten committed Jun 14, 2022
1 parent b2d4e8a commit 4478333
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3
if: failure()
with:
name: Docker Compose logs
name: E2E Docker Compose logs
path: /tmp/docker-compose.log

sharding-e2e:
Expand All @@ -110,5 +110,5 @@ jobs:
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3
if: failure()
with:
name: Docker Compose logs
name: Sharding E2E Docker Compose logs
path: /tmp/docker-compose.log
7 changes: 2 additions & 5 deletions tests/sharding-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ echo "Testing /api/v1/log/entries/retrieve endpoint..."
UUID1=$($REKOR_CLI get --log-index 0 --rekor_server http://localhost:3000 --format json | jq -r .UUID)
UUID2=$($REKOR_CLI get --log-index 3 --rekor_server http://localhost:3000 --format json | jq -r .UUID)

HEX_INITIAL_TREE_ID=$(printf "%x" $INITIAL_TREE_ID | awk '{printf "%016s", $0}')
HEX_INITIAL_SHARD_ID=$(printf "%x" $SHARD_TREE_ID | awk '{printf "%016s", $0}')
HEX_INITIAL_TREE_ID=$(printf "%x" $INITIAL_TREE_ID | awk '{ for(c = 0; c < 16 ; c++) s = s"0"; s = s$1; print substr(s, 1 + length(s) - 16);}')
HEX_INITIAL_SHARD_ID=$(printf "%x" $SHARD_TREE_ID | awk '{ for(c = 0; c < 16 ; c++) s = s"0"; s = s$1; print substr(s, 1 + length(s) - 16);}')

ENTRY_ID_1=$(echo -n "$HEX_INITIAL_TREE_ID$UUID1" | xargs echo -n)
ENTRY_ID_2=$(echo -n "$HEX_INITIAL_SHARD_ID$UUID2" | xargs echo -n)
Expand All @@ -255,6 +255,3 @@ NUM_ELEMENTS=$(curl -f http://localhost:3000/api/v1/log/entries/retrieve -H "Con
stringsMatch $NUM_ELEMENTS "2"

echo "Test passed successfully :)"

echo "testing failure to ensure logs are uploaded"
echo -n "not" | grep "here"

0 comments on commit 4478333

Please sign in to comment.