test: add simple check for kernel-cmdline stage
Add a stage test to check that the new kopts stage is creating the target file /etc/kernel/cmdline with the right content. Since tree diff currently seems to lack support for content hashing new files we work around this by creating first an empty /etc/kernel/cmdline file and then get a content diff with the desired options set.
This commit is contained in:
parent
7a8c76cb1c
commit
a32c30d06c
3 changed files with 73 additions and 0 deletions
29
test/stages_tests/kernel-cmdline/a.json
Normal file
29
test/stages_tests/kernel-cmdline/a.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"build": {
|
||||
"pipeline": {
|
||||
"stages": [
|
||||
{
|
||||
"name": "org.osbuild.dnf",
|
||||
"options": {
|
||||
"releasever": "30",
|
||||
"basearch": "x86_64",
|
||||
"install_weak_deps": false,
|
||||
"repos": [
|
||||
"sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97"
|
||||
],
|
||||
"packages": [
|
||||
"dnf"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"runner": "org.osbuild.fedora30"
|
||||
},
|
||||
"stages": [
|
||||
{
|
||||
"name": "org.osbuild.kernel-cmdline",
|
||||
"options": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
32
test/stages_tests/kernel-cmdline/b.json
Normal file
32
test/stages_tests/kernel-cmdline/b.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"build": {
|
||||
"pipeline": {
|
||||
"stages": [
|
||||
{
|
||||
"name": "org.osbuild.dnf",
|
||||
"options": {
|
||||
"releasever": "30",
|
||||
"basearch": "x86_64",
|
||||
"install_weak_deps": false,
|
||||
"repos": [
|
||||
"sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97"
|
||||
],
|
||||
"packages": [
|
||||
"dnf"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"runner": "org.osbuild.fedora30"
|
||||
},
|
||||
"stages": [
|
||||
{
|
||||
"name": "org.osbuild.kernel-cmdline",
|
||||
"options": {
|
||||
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
|
||||
"kernel_opts": "net.ifnames=0 crashkernel=auto"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
12
test/stages_tests/kernel-cmdline/diff.json
Normal file
12
test/stages_tests/kernel-cmdline/diff.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"added_files": [],
|
||||
"deleted_files": [],
|
||||
"differences": {
|
||||
"/etc/kernel/cmdline": {
|
||||
"content": [
|
||||
"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"sha256:f8636596eb6b9046fa1578df931790da5a8f6a8630749e3616c2d9adf45f9633"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue