summaryrefslogtreecommitdiff
path: root/tests/integration_tests/bugs
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-10-02 15:13:19 -0400
committerGitHub <noreply@github.com>2020-10-02 13:13:19 -0600
commit11fa714f3a7b031657b642d0c2f0155854d5ee0e (patch)
treebbdeefd8cac5d31041fd6b140147f4b19c1f63b0 /tests/integration_tests/bugs
parent82ffc53273927bfc8d71e7f0c858753552d85cf1 (diff)
downloadvyos-cloud-init-11fa714f3a7b031657b642d0c2f0155854d5ee0e.tar.gz
vyos-cloud-init-11fa714f3a7b031657b642d0c2f0155854d5ee0e.zip
add integration test for LP: #1886531 (#592)
Diffstat (limited to 'tests/integration_tests/bugs')
-rw-r--r--tests/integration_tests/bugs/test_lp1886531.py27
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..b1112185
--- /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 /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