test/assemblers: omit None compression option
In the "test_tar" test the compression can be None, which in turn will be serialized as "compression: null" in the options dict. However, this is not a valid option according to the schema. The schema could be adapted to allow for this but it is probably better to just omit empty or null values.
This commit is contained in:
parent
b7367c037e
commit
f81ae9c4c3
1 changed files with 3 additions and 4 deletions
|
|
@ -107,10 +107,9 @@ class TestAssemblers(osbuildtest.TestCase):
|
|||
("tree.tar.gz", "gzip", ["application/x-gzip", "application/gzip"])
|
||||
]
|
||||
for filename, compression, expected_mimetypes in cases:
|
||||
options = {
|
||||
"filename": filename,
|
||||
"compression": compression
|
||||
}
|
||||
options = {"filename": filename}
|
||||
if compression:
|
||||
options["compression"] = compression
|
||||
_, output_id = self.run_assembler("org.osbuild.tar", options)
|
||||
image = f"{self.store}/refs/{output_id}/{filename}"
|
||||
output = subprocess.check_output(["file", "--mime-type", image], encoding="utf-8")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue