Skip to content

Commit

Permalink
test: add full integration test for bp files/dirs
Browse files Browse the repository at this point in the history
This commit adds a full integration test for the files/dir blueprint
customizations.
  • Loading branch information
mvo5 committed Feb 18, 2025
1 parent 3a2e116 commit fba8a3a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,17 @@ def build_images(shared_tmpdir, build_container, request, force_aws_upload, gpg_
"kernel": {
"append": kargs,
},
"files": [
{
"path": "/etc/some-file",
"data": "some-data",
},
],
"directories": [
{
"path": "/etc/some-dir",
},
],
},
}
testutil.maybe_create_filesystem_customizations(cfg, tc)
Expand Down Expand Up @@ -529,6 +540,14 @@ def test_image_boots(image_type):
else:
assert_fs_customizations(image_type, test_vm)

# check file/dir customizations
exit_status, output = test_vm.run("stat /etc/some-file")
assert exit_status == 0
assert "File: /etc/some-file"
_, output = test_vm.run("stat /etc/some-dir")
assert exit_status == 0
assert "File: /etc/some-dir"


@pytest.mark.parametrize("image_type", gen_testcases("ami-boot"), indirect=["image_type"])
def test_ami_boots_in_aws(image_type, force_aws_upload):
Expand Down

0 comments on commit fba8a3a

Please sign in to comment.