From fe8d4686338e97177255f6f7fa1a849b37019c10 Mon Sep 17 00:00:00 2001 From: Gaurav Singh Date: Sat, 11 Apr 2020 11:15:40 -0400 Subject: [PATCH] call T.Fatalf() for nil ptr --- pkg/volume/local/local_linux_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/volume/local/local_linux_test.go b/pkg/volume/local/local_linux_test.go index 1ec7a56d7d6..14f91435ffe 100644 --- a/pkg/volume/local/local_linux_test.go +++ b/pkg/volume/local/local_linux_test.go @@ -37,7 +37,7 @@ func TestFSGroupMount(t *testing.T) { } s := info.Sys().(*syscall.Stat_t) if s == nil { - t.Errorf("Error getting stats for %s (%v)", tmpDir, err) + t.Fatalf("Error getting stats for %s (%v)", tmpDir, err) } fsGroup1 := int64(s.Gid) fsGroup2 := fsGroup1 + 1 @@ -60,7 +60,7 @@ func TestFSGroupMount(t *testing.T) { //Checking if GID of tmpDir has not been changed by mounting it by second pod s = info.Sys().(*syscall.Stat_t) if s == nil { - t.Errorf("Error getting stats for %s (%v)", tmpDir, err) + t.Fatalf("Error getting stats for %s (%v)", tmpDir, err) } if fsGroup1 != int64(s.Gid) { t.Errorf("Old Gid %d for volume %s got overwritten by new Gid %d", fsGroup1, tmpDir, int64(s.Gid))