oomichi / try-kubernetes

12 stars 5 forks source link

ubuntu なのに debian としてテストがスキップされる #52

Closed oomichi closed 5 years ago

oomichi commented 5 years ago
S [SKIPPING] in Spec Setup (BeforeEach) [6.317 seconds]
[sig-storage] Subpath
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/utils/framework.go:22
  [Volume type: gluster]
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/subpath.go:148
    should fail if subpath with backstepping is outside the volume [Slow] [BeforeEach]
    /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/storage/subpath.go:228

    Sep 26 23:52:39.892: Only supported for node OS distro [gci ubuntu] (not debian)

    /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:305
oomichi commented 5 years ago

SkipUnlessMasterOSDistroIs でコントロールしているように見える。

 378 func SkipUnlessNodeOSDistroIs(supportedNodeOsDistros ...string) {
 379         if !NodeOSDistroIs(supportedNodeOsDistros...) {
 380                 Skipf("Only supported for node OS distro %v (not %s)", supportedNodeOsDistros, TestContext.NodeOSDistro)
 381         }
 382 }

TestContext.NodeOSDistro が "debian" として認識されている?

oomichi commented 5 years ago

TestContext.NodeOSDistroの値設定処理を調べる。 test/e2e/framework/test_context.go

256         flag.StringVar(&TestContext.NodeOSDistro, "node-os-distro", "debian", "The OS distribution of cluster VM instances (debian, trusty, or coreos).")

上記、選択肢が誤っていたので k/kubernetes/pull/69384 として PR 提案

oomichi commented 5 years ago

たぶん、e2e テスト実行時に node-os-distro と master-os-distro を指定する必要がありそう。

$ go run hack/e2e.go --provider=skeleton --test --test_args="--ginkgo.focus=should\sremove\sall\sthe\staints\swith\sthe\ssame\skey\soff\sa\snode --master-os-distro=ubuntu --node-os-distro=ubuntu" --check-version-skew=false
oomichi commented 5 years ago

distro指定無しの場合、5件実行

$ go run hack/e2e.go --provider=skeleton --test --test_args="--ginkgo.focus=if\ssubpath\swith\sbackstepping\sis\soutside\sthe\svolume" --check-version-skew=false
...
Ran 5 of 998 Specs in 446.829 seconds
SUCCESS! -- 5 Passed | 0 Failed | 0 Pending | 993 Skipped PASS

distro指定ありの場合、スキップされていたテストが実行されるようになった。

$ go run hack/e2e.go --provider=skeleton --test --test_args="--ginkgo.focus=if\ssubpath\swith\sbackstepping\sis\soutside\sthe\svolume --master-os-distro=ubuntu --node-os-distro=ubuntu" --check-version-skew=false
...
Ran 6 of 998 Specs in 519.263 seconds
FAIL! -- 5 Passed | 1 Failed | 0 Pending | 992 Skipped --- FAIL: TestE2E (519.30s)