ソースを参照

pkg/e2e: fix contains: use assert.Contains (testifylint)

    pkg/e2e/ps_test.go:50:5: contains: use assert.Contains (testifylint)
                    assert.True(t, strings.Contains(line, "127.0.0.1:8001->8000/tcp"))
                    ^
    pkg/e2e/ps_test.go:54:5: contains: use assert.Contains (testifylint)
                    assert.True(t, strings.Contains(line, "80/tcp, 443/tcp, 8080/tcp"))
                    ^

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Sebastiaan van Stijn 1 年間 前
コミット
6f1f76c0e6
1 ファイル変更2 行追加2 行削除
  1. 2 2
      pkg/e2e/ps_test.go

+ 2 - 2
pkg/e2e/ps_test.go

@@ -47,11 +47,11 @@ func TestPs(t *testing.T) {
 		count := 0
 		for _, line := range lines[1:3] {
 			if strings.Contains(line, "e2e-ps-busybox-1") {
-				assert.True(t, strings.Contains(line, "127.0.0.1:8001->8000/tcp"))
+				assert.Contains(t, line, "127.0.0.1:8001->8000/tcp")
 				count++
 			}
 			if strings.Contains(line, "e2e-ps-nginx-1") {
-				assert.True(t, strings.Contains(line, "80/tcp, 443/tcp, 8080/tcp"))
+				assert.Contains(t, line, "80/tcp, 443/tcp, 8080/tcp")
 				count++
 			}
 		}