Skip to content

Commit

Permalink
Stabilize integration test names
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Jul 22, 2020
1 parent 0b678bb commit 8f9be8a
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion test/integration/apiserver/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,33 @@ func TestListOptions(t *testing.T) {
for _, continueToken := range continueTokens {
for _, rv := range rvs {
for _, rvMatch := range rvMatches {
name := fmt.Sprintf("limit=%d continue=%s rv=%s rvMatch=%s", limit, continueToken, rv, rvMatch)
rvName := ""
switch rv {
case "":
rvName = "empty"
case "0":
rvName = "0"
case compactedRv:
rvName = "compacted"
case invalidResourceVersion:
rvName = "invalid"
default:
rvName = "unknown"
}

continueName := ""
switch continueToken {
case "":
continueName = "empty"
case validContinueToken:
continueName = "valid"
case invalidContinueToken:
continueName = "invalid"
default:
continueName = "unknown"
}

name := fmt.Sprintf("limit=%d continue=%s rv=%s rvMatch=%s", limit, continueName, rvName, rvMatch)
t.Run(name, func(t *testing.T) {
opts := metav1.ListOptions{
ResourceVersion: rv,
Expand Down

0 comments on commit 8f9be8a

Please sign in to comment.