diff --git a/tests/harness_test.go b/tests/harness_test.go index a6ac1a7b2..feb15f125 100644 --- a/tests/harness_test.go +++ b/tests/harness_test.go @@ -246,7 +246,12 @@ func compareAttestation(t *testing.T, logIndex int, got string) { // Make sure we can get and verify all entries // For attestations, make sure we can see the attestation +// Older versions of the CLI may not be able to parse the retrieved entry. func TestHarnessGetAllEntriesLogIndex(t *testing.T) { + if rekorCLIIncompatible() { + t.Skipf("Skipping getting entries by UUID, old rekor-cli version %s is incompatible with server version %s", os.Getenv("CLI_VERSION"), os.Getenv("SERVER_VERSION")) + } + treeSize := activeTreeSize(t) if treeSize == 0 { t.Fatal("There are 0 entries in the log, there should be at least 2") @@ -331,11 +336,15 @@ func activeTreeSize(t *testing.T) int { // Check if we have a new server version and an old CLI version // since the new server returns an EntryID but the old CLI version expects a UUID +// Also, new rekor server allows upload of intoto v0.0.2, and old rekor cli versions +// don't understand how to parse these entries. +// TODO: use semver comparisons. func rekorCLIIncompatible() bool { if sv := os.Getenv("SERVER_VERSION"); sv != "v0.10.0" && sv != "v0.11.0" { if cv := os.Getenv("CLI_VERSION"); cv == "v0.10.0" || cv == "v0.11.0" { return true } } + return false }