Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 0 log index #385

Merged
merged 1 commit into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/rekor-cli/app/pflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func validateLogIndex(v string) error {
return err
}
l := struct {
Index int `validate:"required,gte=0"`
Index int `validate:"gte=0"`
}{i}

return useValidator(logIndexFlag, l)
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ func TestGet(t *testing.T) {

uuid := getUUIDFromUploadOutput(t, out)

// since we at least have 1 valid entry, check the log at index 0
runCli(t, "get", "--log-index", "0")

out = runCli(t, "get", "--format=json", "--uuid", uuid)

// The output here should be in JSON with this structure:
Expand Down