-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Luks blackbox tests #1685
Luks blackbox tests #1685
Conversation
0e5c593
to
efb11c6
Compare
7e2ffb6
to
5489926
Compare
dfa7816
to
1a9aee7
Compare
1a9aee7
to
b55d5f2
Compare
e84adda
to
6ea7fac
Compare
71395ca
to
0069a26
Compare
Added issue for Clevis binding validation; feel free to add more detail. #1877 |
0069a26
to
0752a7d
Compare
tests/blackbox_test.go
Outdated
@@ -150,6 +151,7 @@ func outer(t *testing.T, test types.Test, negativeTests bool) error { | |||
if err != nil { | |||
return err | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: extraneous
tests/negative/luks/creation.go
Outdated
register.Register(register.NegativeTest, LuksOnNonExtDevice()) | ||
} | ||
|
||
func LuksOnNonExtDevice() types.Test { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a docstring above this line explaining what this negative test is checking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add more detail if necessary I fixed some naming and I think that does a lot.
tests/positive/luks/creation.go
Outdated
"ignition": { "version": "$version" }, | ||
"storage": { | ||
"disks": [ | ||
{ | ||
"device": "$DEVICE", | ||
"partitions": [ | ||
{ | ||
"label": "luks-device", | ||
"sizeMiB": 0, | ||
"startMiB": 0 | ||
} | ||
], | ||
"wipe_table": true | ||
} | ||
], | ||
"luks": [ | ||
{ | ||
"device": "$DEVICE", | ||
"name": "$UUID", | ||
"keyFile": { | ||
"compression": "", | ||
"source": "data:,REPLACE-THIS-WITH-YOUR-KEY-MATERIAL" | ||
}, | ||
"wipe_volume": true | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is creating a partition on $DEVICE
, but then creating a LUKS device on the disk instead of the partition, nuking the freshly created partition table. Is that intended?
Similarly below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah; Some how doing it this way made the tests pass. I am not sure why but I was using 'wipe_volume' which is bu. not ign. and this config got away with it. I noticed that just now and dropped the partitions and switched to the correct .ign field.
0aa6c4c
to
61e9cf5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits but looks great!
Until now, the blackbox tests would not correctly cleanup after running a test with a luks device. Now Luks devices can be tested using blackbox test framework.
61e9cf5
to
6278609
Compare
#1554