mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Remove fail argument from ReadOrDie()
Every caller of ReadOrDie() specified ginkgo.Fail as fail argument, and that was intentional to avoid depending on Ginkgo. However that just spreaded the dependency on Ginkgo to caller sides. Especially that was unnecessary e2e test framework "ingress" depended on Ginkgo only for the above reason. Now we are cleaning up the dependencies on e2e tests, so let's just remove such dependencies.
This commit is contained in:
@@ -133,7 +133,7 @@ func cleanupKubectlInputs(fileContents string, ns string, selectors ...string) {
|
||||
}
|
||||
|
||||
func readTestFileOrDie(file string) []byte {
|
||||
return testfiles.ReadOrDie(path.Join(kubeCtlManifestPath, file), ginkgo.Fail)
|
||||
return testfiles.ReadOrDie(path.Join(kubeCtlManifestPath, file))
|
||||
}
|
||||
|
||||
func runKubectlRetryOrDie(args ...string) string {
|
||||
@@ -275,8 +275,8 @@ var _ = SIGDescribe("Kubectl client", func() {
|
||||
var nautilus, kitten string
|
||||
ginkgo.BeforeEach(func() {
|
||||
updateDemoRoot := "test/fixtures/doc-yaml/user-guide/update-demo"
|
||||
nautilus = commonutils.SubstituteImageName(string(testfiles.ReadOrDie(filepath.Join(updateDemoRoot, "nautilus-rc.yaml.in"), ginkgo.Fail)))
|
||||
kitten = commonutils.SubstituteImageName(string(testfiles.ReadOrDie(filepath.Join(updateDemoRoot, "kitten-rc.yaml.in"), ginkgo.Fail)))
|
||||
nautilus = commonutils.SubstituteImageName(string(testfiles.ReadOrDie(filepath.Join(updateDemoRoot, "nautilus-rc.yaml.in"))))
|
||||
kitten = commonutils.SubstituteImageName(string(testfiles.ReadOrDie(filepath.Join(updateDemoRoot, "kitten-rc.yaml.in"))))
|
||||
})
|
||||
/*
|
||||
Release : v1.9
|
||||
@@ -340,7 +340,7 @@ var _ = SIGDescribe("Kubectl client", func() {
|
||||
"redis-master-deployment.yaml.in",
|
||||
"redis-slave-deployment.yaml.in",
|
||||
} {
|
||||
contents := commonutils.SubstituteImageName(string(testfiles.ReadOrDie(filepath.Join(guestbookRoot, gbAppFile), ginkgo.Fail)))
|
||||
contents := commonutils.SubstituteImageName(string(testfiles.ReadOrDie(filepath.Join(guestbookRoot, gbAppFile))))
|
||||
run(contents)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user