Skip to content

Commit 8a8e50e

Browse files
committed
fsverity_test.go: fix nil pointer dereference, fix test fail
Signed-off-by: Alexey Lunev <[email protected]>
1 parent a78a24e commit 8a8e50e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/fsverity/fsverity_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ func TestIsEnabled(t *testing.T) {
123123
t.Errorf("fsverity Enable failed: %s", err.Error())
124124
}
125125

126-
if enabled, err := IsEnabled(verityFile); !enabled || err != nil {
127-
t.Errorf("expected fsverity to be enabled on file, received enabled: %t; error: %s", enabled, err.Error())
126+
if enabled, err := IsEnabled(verityFile); !enabled && err != nil {
127+
t.Errorf("expected fsverity to be enabled on file, received enabled: %t; error: %v", enabled, err)
128128
}
129129
}
130130

0 commit comments

Comments
 (0)