@@ -18,21 +18,21 @@ func checkErrors(t *testing.T, title string, msgs []string, valid bool) {
1818 }
1919}
2020
21- func TestCheckRootfsPath (t * testing.T ) {
21+ func TestCheckRoot (t * testing.T ) {
2222 tmpBundle , err := ioutil .TempDir ("" , "oci-check-rootfspath" )
2323 if err != nil {
24- t .Fatalf ("Failed to create a TempDir in 'CheckRootfsPath '" )
24+ t .Fatalf ("Failed to create a TempDir in 'CheckRoot '" )
2525 }
2626 defer os .RemoveAll (tmpBundle )
2727
2828 rootfsDir := "rootfs"
2929 rootfsNonDir := "rootfsfile"
3030 rootfsNonExists := "rootfsnil"
3131 if err := os .MkdirAll (filepath .Join (tmpBundle , rootfsDir ), 0700 ); err != nil {
32- t .Fatalf ("Failed to create a rootfs directory in 'CheckRootfsPath '" )
32+ t .Fatalf ("Failed to create a rootfs directory in 'CheckRoot '" )
3333 }
3434 if _ , err := os .Create (filepath .Join (tmpBundle , rootfsNonDir )); err != nil {
35- t .Fatalf ("Failed to create a non-directory rootfs in 'CheckRootfsPath '" )
35+ t .Fatalf ("Failed to create a non-directory rootfs in 'CheckRoot '" )
3636 }
3737
3838 cases := []struct {
@@ -48,7 +48,7 @@ func TestCheckRootfsPath(t *testing.T) {
4848 }
4949 for _ , c := range cases {
5050 v := NewValidator (& rspec.Spec {Root : & rspec.Root {Path : c .val }}, tmpBundle , false , "linux" )
51- checkErrors (t , "CheckRootfsPath " + c .val , v .CheckRootfsPath (), c .expected )
51+ checkErrors (t , "CheckRoot " + c .val , v .CheckRoot (), c .expected )
5252 }
5353}
5454
0 commit comments