Replace testify with gotest.tools (#553)
* vendor gotest.tools * Run gotest.tools migration tools * Fixup tests that were improperly converted * Remove unused testify package vendors
This commit is contained in:
@@ -3,10 +3,10 @@ package operations
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/virtual-kubelet/virtual-kubelet/providers/vic/proxy/mocks"
|
||||
"github.com/vmware/vic/lib/apiservers/portlayer/client"
|
||||
"gotest.tools/assert"
|
||||
is "gotest.tools/assert/cmp"
|
||||
)
|
||||
|
||||
func TestNewPodStarter(t *testing.T) {
|
||||
@@ -18,16 +18,16 @@ func TestNewPodStarter(t *testing.T) {
|
||||
|
||||
// Positive Cases
|
||||
s, err = NewPodStarter(client, ip)
|
||||
assert.NotNil(t, s, "Expected non-nil creating a pod starter but received nil")
|
||||
assert.Check(t, s != nil, "Expected non-nil creating a pod starter but received nil")
|
||||
|
||||
// Negative Cases
|
||||
s, err = NewPodStarter(nil, ip)
|
||||
assert.Nil(t, s, "Expected nil")
|
||||
assert.Equal(t, err, PodStarterPortlayerClientError)
|
||||
assert.Check(t, is.Nil(s), "Expected nil")
|
||||
assert.Check(t, is.DeepEqual(err, PodStarterPortlayerClientError))
|
||||
|
||||
s, err = NewPodStarter(client, nil)
|
||||
assert.Nil(t, s, "Expected nil")
|
||||
assert.Equal(t, err, PodStarterIsolationProxyError)
|
||||
assert.Check(t, is.Nil(s), "Expected nil")
|
||||
assert.Check(t, is.DeepEqual(err, PodStarterIsolationProxyError))
|
||||
}
|
||||
|
||||
//NOTE: The rest of PodStarter tests were handled in PodCreator's tests so there's no need for further tests.
|
||||
|
||||
Reference in New Issue
Block a user