Skip to content

Commit 8f9be8a

Browse files
committed
Stabilize integration test names
1 parent 0b678bb commit 8f9be8a

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

test/integration/apiserver/apiserver_test.go

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,33 @@ func TestListOptions(t *testing.T) {
393393
for _, continueToken := range continueTokens {
394394
for _, rv := range rvs {
395395
for _, rvMatch := range rvMatches {
396-
name := fmt.Sprintf("limit=%d continue=%s rv=%s rvMatch=%s", limit, continueToken, rv, rvMatch)
396+
rvName := ""
397+
switch rv {
398+
case "":
399+
rvName = "empty"
400+
case "0":
401+
rvName = "0"
402+
case compactedRv:
403+
rvName = "compacted"
404+
case invalidResourceVersion:
405+
rvName = "invalid"
406+
default:
407+
rvName = "unknown"
408+
}
409+
410+
continueName := ""
411+
switch continueToken {
412+
case "":
413+
continueName = "empty"
414+
case validContinueToken:
415+
continueName = "valid"
416+
case invalidContinueToken:
417+
continueName = "invalid"
418+
default:
419+
continueName = "unknown"
420+
}
421+
422+
name := fmt.Sprintf("limit=%d continue=%s rv=%s rvMatch=%s", limit, continueName, rvName, rvMatch)
397423
t.Run(name, func(t *testing.T) {
398424
opts := metav1.ListOptions{
399425
ResourceVersion: rv,

0 commit comments

Comments
 (0)