diff options
author | zdc <zdc@users.noreply.github.com> | 2020-12-25 18:57:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-25 18:57:19 +0200 |
commit | 27c317f83d8e393254b6766b34fdf8d29148ea8f (patch) | |
tree | ea824de28fa639ba6ba8b212efaf53b5df2e90d9 /tests/integration_tests/bugs/test_lp1886531.py | |
parent | 66dc53b1b3f8786f3bbb25e914c1dc8161af0494 (diff) | |
parent | c6bcb8df28daa234686a563549681082eb3283a1 (diff) | |
download | vyos-cloud-init-27c317f83d8e393254b6766b34fdf8d29148ea8f.tar.gz vyos-cloud-init-27c317f83d8e393254b6766b34fdf8d29148ea8f.zip |
Merge pull request #28 from zdc/T2117-equuleus-20.4
T2117: Cloud-init updated to 20.4
Diffstat (limited to 'tests/integration_tests/bugs/test_lp1886531.py')
-rw-r--r-- | tests/integration_tests/bugs/test_lp1886531.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/integration_tests/bugs/test_lp1886531.py b/tests/integration_tests/bugs/test_lp1886531.py new file mode 100644 index 00000000..058ea8bb --- /dev/null +++ b/tests/integration_tests/bugs/test_lp1886531.py @@ -0,0 +1,27 @@ +"""Integration test for LP: #1886531 + +This test replicates the failure condition (absent /etc/fstab) on all releases +by removing it in a bootcmd; this runs well before the part of cloud-init which +causes the failure. + +The only required assertion is that cloud-init does not emit a WARNING to the +log: this indicates that the fstab parsing code has not failed. + +https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1886531 +""" +import pytest + + +USER_DATA = """\ +#cloud-config +bootcmd: +- rm -f /etc/fstab +""" + + +class TestLp1886531: + + @pytest.mark.user_data(USER_DATA) + def test_lp1886531(self, client): + log_content = client.read_from_file("/var/log/cloud-init.log") + assert "WARNING" not in log_content |