mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
Use Ginkgo Skip() to avoid failing when tests are skipped
- Added util methods: Skipf, SkipUnlessNodeCountIsAtLeast, SkipIfProviderIs, and SkipUnlessProviderIs
This commit is contained in:
@@ -109,16 +109,15 @@ var _ = Describe("Kubectl client", func() {
|
||||
|
||||
Describe("Guestbook application", func() {
|
||||
var guestbookPath string
|
||||
|
||||
BeforeEach(func() {
|
||||
guestbookPath = filepath.Join(testContext.RepoRoot, "examples/guestbook")
|
||||
|
||||
// requires ExternalLoadBalancer support
|
||||
SkipUnlessProviderIs("gce", "gke", "aws")
|
||||
})
|
||||
|
||||
It("should create and stop a working application", func() {
|
||||
if !providerIs("gce", "gke", "aws") {
|
||||
By(fmt.Sprintf("Skipping guestbook, uses createExternalLoadBalancer, a (gce|gke|aws) feature"))
|
||||
return
|
||||
}
|
||||
|
||||
defer cleanup(guestbookPath, ns, frontendSelector, redisMasterSelector, redisSlaveSelector)
|
||||
|
||||
By("creating all guestbook components")
|
||||
|
Reference in New Issue
Block a user