diff --git a/tests/sharding-e2e-test.sh b/tests/sharding-e2e-test.sh index 700f4ad2a..7e7e0c694 100755 --- a/tests/sharding-e2e-test.sh +++ b/tests/sharding-e2e-test.sh @@ -25,14 +25,12 @@ echo "Installing createtree..." go install github.com/google/trillian/cmd/createtree@latest echo "starting services" -docker-compose up -d +docker-compose up -d --build rm ~/.rekor/state.json || true -echo "building CLI and server" +echo "building CLI" go build -o rekor-cli ./cmd/rekor-cli REKOR_CLI=$(pwd)/rekor-cli -go build -o rekor-server ./cmd/rekor-server - function check_log_index () { logIndex=$1 @@ -94,7 +92,7 @@ function collectLogsOnFailure () { fi exit 0 } -trap "collectLogsOnFailure $?" EXIT +trap "collectLogsOnFailure \$?" EXIT echo "Waiting for rekor server to come up..." waitForRekorServer @@ -265,13 +263,13 @@ NUM_ELEMENTS=$(curl -f -H "Content-Type: application/json" --data '{"logIndexes" stringsMatch $NUM_ELEMENTS "2" # Make sure we get the expected LogIndex in the response when calling /retrieve endpoint -RETRIEVE_LOGINDEX1=$(curl -f http://localhost:3000/api/v1/log/entries/retrieve -H "Content-Type: application/json" -H "Accept: application/json" -d "{ \"logIndexes\": [1]}" | jq '.[0]' | jq -r .$UUID1.logIndex) +RETRIEVE_LOGINDEX1=$(curl -f http://localhost:3000/api/v1/log/entries/retrieve -H "Content-Type: application/json" -H "Accept: application/json" -d "{ \"logIndexes\": [1]}" | jq '.[0]' | jq -r "with_entries(select(.key|test(\"^"$ENTRY_ID_1"$\"))) | .[].logIndex") stringsMatch $RETRIEVE_LOGINDEX1 "1" # Make sure that verification succeeds via UUID echo echo "Testing rekor-cli verification via UUID..." -$REKOR_CLI verify --uuid $UUID1 --rekor_server http://localhost:3000 +$REKOR_CLI verify --uuid $ENTRY_ID_1 --rekor_server http://localhost:3000 # Make sure that verification succeeds via Entry ID (Tree ID in hex + UUID) echo diff --git a/tests/test_file.sig b/tests/test_file.sig new file mode 100644 index 000000000..3adcf93a1 Binary files /dev/null and b/tests/test_file.sig differ diff --git a/tests/test_file.txt b/tests/test_file.txt new file mode 100644 index 000000000..0e3da20d1 --- /dev/null +++ b/tests/test_file.txt @@ -0,0 +1 @@ +hello rekor diff --git a/tests/test_public_key.key b/tests/test_public_key.key new file mode 100644 index 000000000..2d24cebd8 --- /dev/null +++ b/tests/test_public_key.key @@ -0,0 +1,41 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGNBF+cIM0BDACa8G7RD2v3miwMtxVaZi3JBVueVAqHKC4eKoMS5HMCRo+HZVRA +70XmsTpX1Z1gZQuuC0GDY26hBhejAq3hx2rv6/8q90BvWGH9tVeGpL1saIm52gER +XyVggz5kAC0S6vMn7dr2etBkWWP+Oj05S02YZBTYgxpObyecUScqKNTjslZQBH2d +SHuk3o2Z7hM49U0l7zbWw4oIT+lARcsajQTwWjliaPD/HRjT2nROhIhited/wgyz +ydIq5e6s18VLcT75qWnrZXNPWFwf25RXY3utkW+GW5nQeN80Q2kREgkxFs5Ad5WZ +vE7t8/hx5zmslZ4tfF4si3QZeIQBacYbwxMPSDf9oFGxdGFT889wJLGgWmr1TkPM +cN06wxARGtxN0z61FJTijLWRbjW3unI9hcQcUlN/Q+16otHpeKVg4oW00CrvWOD6 +qkLcMD49yUD8fSGB+REniBa89C9kQU4SKdgsLL/Q+JK+Sy9KmIDrm1a4DfP1psfe +LjarzsVZfKUHfwcAEQEAAbQiTHVrZSBIaW5kcyA8bGhpbmRzQHByb3Rvbm1haWwu +Y29tPokB1AQTAQgAPhYhBHIAlFxu/GnY+oRlCSa3waCdOKR6BQJfnCDNAhsDBQkD +wmcABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJECa3waCdOKR6Z1kL/1IK0vde +ZX5r5SebNxTINSAAvYkrKRyJ5f7lOM9gLGIuc2FoNUnjVQT0rIG9019h48pCy91f +XjDDRMY9gzFWWCgGnXh1hWI3M7BJF6YE6u6DXGsvuUpGrNeZAG6kkazAuAnnV0kC +08zoRrAZCvlpaZryd8itb+rV+QKp7Aw2l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