Replace gomega with testify
This commit is contained in:
parent
9cf4154f4f
commit
046e2d959d
9 changed files with 158 additions and 147 deletions
|
|
@ -22,7 +22,6 @@ import (
|
|||
"time"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
|
|
@ -39,7 +38,7 @@ const (
|
|||
Poll = 2 * time.Second
|
||||
|
||||
// DefaultTimeout time to wait for operations to complete
|
||||
DefaultTimeout = 2 * time.Minute
|
||||
DefaultTimeout = 90 * time.Second
|
||||
)
|
||||
|
||||
func nowStamp() string {
|
||||
|
|
@ -125,14 +124,6 @@ func DeleteKubeNamespace(c kubernetes.Interface, namespace string) error {
|
|||
})
|
||||
}
|
||||
|
||||
// ExpectNoError tests whether an error occurred.
|
||||
func ExpectNoError(err error, explain ...interface{}) {
|
||||
if err != nil {
|
||||
Logf("Unexpected error occurred: %v", err)
|
||||
}
|
||||
ExpectWithOffset(1, err).NotTo(HaveOccurred(), explain...)
|
||||
}
|
||||
|
||||
// WaitForKubeNamespaceNotExist waits until a namespaces is not present in the cluster
|
||||
func WaitForKubeNamespaceNotExist(c kubernetes.Interface, namespace string) error {
|
||||
return wait.PollImmediate(Poll, DefaultTimeout, namespaceNotExist(c, namespace))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue