mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-27 17:25:20 -04:00
AB#1902 Ping Coordinator from initramfs for key (#53)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
7e990fb91a
commit
49a1a07049
20 changed files with 827 additions and 267 deletions
|
@ -49,10 +49,16 @@ func TestMapper(t *testing.T) {
|
|||
require.NoError(err, "failed to initialize crypt device")
|
||||
defer func() { require.NoError(mapper.Close(), "failed to close crypt device") }()
|
||||
|
||||
assert.False(mapper.IsLUKSDevice())
|
||||
|
||||
// Format and map disk
|
||||
passphrase := "unit-test"
|
||||
require.NoError(mapper.FormatDisk(passphrase), "failed to format disk")
|
||||
require.NoError(mapper.MapDisk(mappedDevice, passphrase), "failed to map disk")
|
||||
|
||||
require.NoError(mapper.UnmapDisk(mappedDevice), "failed to remove disk mapping")
|
||||
|
||||
assert.True(mapper.IsLUKSDevice())
|
||||
|
||||
// Try to map disk with incorrect passphrase
|
||||
assert.Error(mapper.MapDisk(mappedDevice, "invalid-passphrase"), "was able to map disk with incorrect passphrase")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue