Replace gomega with testify
This commit is contained in:
parent
9cf4154f4f
commit
046e2d959d
9 changed files with 158 additions and 147 deletions
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package framework
|
||||
|
||||
import (
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
@ -69,9 +69,8 @@ func (f *Framework) NewInfluxDBDeployment() {
|
|||
}
|
||||
|
||||
cm, err := f.EnsureConfigMap(configuration)
|
||||
Expect(err).NotTo(HaveOccurred(), "failed to create an Influxdb deployment")
|
||||
|
||||
Expect(cm).NotTo(BeNil(), "expected a configmap but none returned")
|
||||
assert.Nil(ginkgo.GinkgoT(), err, "creating an Influxdb deployment")
|
||||
assert.NotNil(ginkgo.GinkgoT(), cm, "expected a configmap but none returned")
|
||||
|
||||
deployment := &appsv1.Deployment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
|
@ -140,5 +139,5 @@ func (f *Framework) NewInfluxDBDeployment() {
|
|||
err = WaitForPodsReady(f.KubeClientSet, DefaultTimeout, 1, f.Namespace, metav1.ListOptions{
|
||||
LabelSelector: fields.SelectorFromSet(fields.Set(d.Spec.Template.ObjectMeta.Labels)).String(),
|
||||
})
|
||||
Expect(err).NotTo(HaveOccurred(), "failed to wait for influxdb to become ready")
|
||||
assert.NotNil(ginkgo.GinkgoT(), err, "failed to wait for influxdb to become ready")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue