mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-12-09 21:16:52 -05:00
csi: let constructor take care of setting up cryptsetup (#2312)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
d3c940a6a0
commit
327315d5de
4 changed files with 15 additions and 10 deletions
|
|
@ -57,7 +57,11 @@ func TestCloseCryptDevice(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
mapper := New(&fakeKMS{}, &stubCryptDevice{})
|
||||
mapper := &CryptMapper{
|
||||
mapper: &stubCryptDevice{},
|
||||
kms: &fakeKMS{},
|
||||
getDiskFormat: getDiskFormat,
|
||||
}
|
||||
err := mapper.CloseCryptDevice("volume01-unit-test")
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
|
@ -214,7 +218,11 @@ func TestOpenCryptDevice(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
mapper := New(&fakeKMS{}, &stubCryptDevice{})
|
||||
mapper := &CryptMapper{
|
||||
mapper: &stubCryptDevice{},
|
||||
kms: &fakeKMS{},
|
||||
getDiskFormat: getDiskFormat,
|
||||
}
|
||||
_, err := mapper.OpenCryptDevice(context.Background(), "/dev/some-device", "volume01", false)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue