Skip to content

Commit 11c8739

Browse files
authored
fix(filesystem): repair block device test and GH workflow parameters (#89)
1 parent 6bb0c52 commit 11c8739

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/test.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
branches: ["main"]
66
pull_request:
77
paths:
8-
- driver/**
8+
- internal/**
9+
- cmd/**
910
- vendor/**
1011
- go.*
1112
- .github/**

internal/filesystem/filesystem_internal_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,14 @@ func mountBlockDevice(t *testing.T, m *LinuxFilesystem, partition string) error
283283
mountPath := filepath.Join(os.TempDir(), fmt.Sprintf("%s-mount-path-%d", driverName, time.Now().Unix()))
284284
defer os.RemoveAll(mountPath)
285285

286-
return mount(t, m, partition, mountPath, "bind")
286+
return mount(t, m, partition, mountPath, "", "bind")
287287
}
288288

289-
func mount(t *testing.T, m *LinuxFilesystem, source, target, fsType string) error {
289+
func mount(t *testing.T, m *LinuxFilesystem, source, target, fsType string, opts ...string) error {
290290
t.Helper()
291291

292-
if err := m.Mount(context.Background(), source, target, fsType); err != nil {
293-
return fmt.Errorf("Mount failed with error: %w", err)
292+
if err := m.Mount(context.Background(), source, target, fsType, opts...); err != nil {
293+
return fmt.Errorf("Mount %s %s => %s failed with error: %w", fsType, source, target, err)
294294
}
295295
isMounted, err := m.IsMounted(context.Background(), target)
296296
if err != nil {

0 commit comments

Comments
 (0)