Преглед на файлове

Merge pull request #46181 from vvoland/tests-volumemounts-nilerror

test/volume: Replace Check with NilError where suitable
Sebastiaan van Stijn преди 1 година
родител
ревизия
3c8b68c636

+ 1 - 1
volume/mounts/lcow_parser_test.go

@@ -220,7 +220,7 @@ func TestLCOWParseMountRawSplit(t *testing.T) {
 				return
 				return
 			}
 			}
 
 
-			assert.Check(t, err)
+			assert.NilError(t, err)
 			assert.Check(t, is.Equal(m.Destination, tc.expDest))
 			assert.Check(t, is.Equal(m.Destination, tc.expDest))
 			assert.Check(t, is.Equal(m.Source, tc.expSource))
 			assert.Check(t, is.Equal(m.Source, tc.expSource))
 			assert.Check(t, is.Equal(m.Name, tc.expName))
 			assert.Check(t, is.Equal(m.Name, tc.expName))

+ 1 - 1
volume/mounts/linux_parser_test.go

@@ -188,7 +188,7 @@ func TestLinuxParseMountRawSplit(t *testing.T) {
 				return
 				return
 			}
 			}
 
 
-			assert.Check(t, err)
+			assert.NilError(t, err)
 			assert.Check(t, is.Equal(m.Destination, tc.expDest))
 			assert.Check(t, is.Equal(m.Destination, tc.expDest))
 			assert.Check(t, is.Equal(m.Source, tc.expSource))
 			assert.Check(t, is.Equal(m.Source, tc.expSource))
 			assert.Check(t, is.Equal(m.Name, tc.expName))
 			assert.Check(t, is.Equal(m.Name, tc.expName))

+ 2 - 1
volume/mounts/parser_test.go

@@ -82,7 +82,8 @@ func TestParseMountSpec(t *testing.T) {
 		tc := tc
 		tc := tc
 		t.Run("", func(t *testing.T) {
 		t.Run("", func(t *testing.T) {
 			mp, err := parser.ParseMountSpec(tc.input)
 			mp, err := parser.ParseMountSpec(tc.input)
-			assert.Check(t, err)
+			assert.NilError(t, err)
+
 			assert.Check(t, is.Equal(mp.Type, tc.expected.Type))
 			assert.Check(t, is.Equal(mp.Type, tc.expected.Type))
 			assert.Check(t, is.Equal(mp.Destination, tc.expected.Destination))
 			assert.Check(t, is.Equal(mp.Destination, tc.expected.Destination))
 			assert.Check(t, is.Equal(mp.Source, tc.expected.Source))
 			assert.Check(t, is.Equal(mp.Source, tc.expected.Source))

+ 1 - 1
volume/mounts/windows_parser_test.go

@@ -234,7 +234,7 @@ func TestWindowsParseMountRawSplit(t *testing.T) {
 				return
 				return
 			}
 			}
 
 
-			assert.Check(t, err)
+			assert.NilError(t, err)
 			assert.Check(t, is.Equal(m.Destination, tc.expDest))
 			assert.Check(t, is.Equal(m.Destination, tc.expDest))
 			assert.Check(t, is.Equal(m.Source, tc.expSource))
 			assert.Check(t, is.Equal(m.Source, tc.expSource))
 			assert.Check(t, is.Equal(m.Name, tc.expName))
 			assert.Check(t, is.Equal(m.Name, tc.expName))

+ 1 - 1
volume/service/store_test.go

@@ -379,7 +379,7 @@ func setupTest(t *testing.T) (*VolumeStore, func()) {
 	}
 	}
 
 
 	s, err := NewStore(dir, volumedrivers.NewStore(nil))
 	s, err := NewStore(dir, volumedrivers.NewStore(nil))
-	assert.Check(t, err)
+	assert.NilError(t, err)
 	return s, func() {
 	return s, func() {
 		s.Shutdown()
 		s.Shutdown()
 		cleanup()
 		cleanup()