forked from rosa/hakurei
internal/uevent: optionally pass UUID during coldboot
This enables rejection of non-coldboot synthetic events. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -59,7 +59,7 @@ func TestColdboot(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
err := uevent.Coldboot(t.Context(), d, visited, func(err error) error {
|
||||
err := uevent.Coldboot(t.Context(), d, nil, visited, func(err error) error {
|
||||
t.Errorf("handleWalkErr: %v", err)
|
||||
return err
|
||||
})
|
||||
@@ -219,7 +219,7 @@ func TestColdbootError(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
if err := uevent.Coldboot(ctx, d, visited, handleWalkErr); !reflect.DeepEqual(err, wantErr) {
|
||||
if err := uevent.Coldboot(ctx, d, new(uevent.UUID), visited, handleWalkErr); !reflect.DeepEqual(err, wantErr) {
|
||||
t.Errorf("Coldboot: error = %v, want %v", err, wantErr)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user