Skip to content

Commit

Permalink
Fix test fakes
Browse files Browse the repository at this point in the history
  • Loading branch information
edeckers committed Jan 18, 2021
1 parent 007265b commit 77c673b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,16 @@ type fakeMounter struct {
mounted map[string]string
}

func (f *fakeMounter) Format(source string, fsType string) error {
func (f *fakeMounter) Format(source string, fsType string, context LuksContext) error {
return nil
}

func (f *fakeMounter) Mount(source string, target string, fsType string, options ...string) error {
func (f *fakeMounter) Mount(source string, target string, fsType string, context LuksContext, options ...string) error {
f.mounted[target] = source
return nil
}

func (f *fakeMounter) Unmount(target string) error {
func (f *fakeMounter) Unmount(target string, context LuksContext) error {
delete(f.mounted, target)
return nil
}
Expand All @@ -534,9 +534,10 @@ func (f *fakeMounter) GetDeviceName(_ mount.Interface, mountPath string) (string
return "", nil
}

func (f *fakeMounter) IsFormatted(source string) (bool, error) {
func (f *fakeMounter) IsFormatted(source string, context LuksContext) (bool, error) {
return true, nil
}

func (f *fakeMounter) IsMounted(target string) (bool, error) {
_, ok := f.mounted[target]
return ok, nil
Expand Down

0 comments on commit 77c673b

Please sign in to comment.