mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
tests: swap testify for test in more places (#20028)
* tests: swap testify for test in plugins/csi/client_test.go * tests: swap testify for test in testutil/ * tests: swap testify for test in host_test.go * tests: swap testify for test in plugin_test.go * tests: swap testify for test in utils_test.go * tests: swap testify for test in scheduler/ * tests: swap testify for test in parse_test.go * tests: swap testify for test in attribute_test.go * tests: swap testify for test in plugins/drivers/ * tests: swap testify for test in command/ * tests: fixup some test usages * go: run go mod tidy * windows: cpuset test only on linux
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/nomad/helper/pointer"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/shoenig/test/must"
|
||||
)
|
||||
|
||||
func TestAttribute_Validate(t *testing.T) {
|
||||
@@ -77,7 +77,7 @@ func TestAttribute_Validate(t *testing.T) {
|
||||
for _, c := range cases {
|
||||
t.Run(c.Input.GoString(), func(t *testing.T) {
|
||||
if err := c.Input.Validate(); err != nil && !c.Fail {
|
||||
require.NoError(t, err)
|
||||
must.NoError(t, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -538,7 +538,7 @@ func testComparison(t *testing.T, cases []*compareTestCase) {
|
||||
if !ok && !c.NotComparable {
|
||||
t.Fatal("should be comparable")
|
||||
} else if ok {
|
||||
require.Equal(t, c.Expected, v)
|
||||
must.Eq(t, c.Expected, v)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -662,8 +662,8 @@ func TestAttribute_ParseAndValidate(t *testing.T) {
|
||||
for _, c := range cases {
|
||||
t.Run(c.Input, func(t *testing.T) {
|
||||
a := ParseAttribute(c.Input)
|
||||
require.Equal(t, c.Expected, a)
|
||||
require.NoError(t, a.Validate())
|
||||
must.Eq(t, c.Expected, a)
|
||||
must.NoError(t, a.Validate())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user