tests/installed: Add var-mount.yml destructive test
authorColin Walters <walters@verbum.org>
Wed, 4 Jul 2018 15:57:50 +0000 (11:57 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 4 Jul 2018 16:06:38 +0000 (16:06 +0000)
Closes: #1668
Approved by: cgwalters

tests/installed/destructive-ansible.yml
tests/installed/destructive/var-mount.yml [new file with mode: 0644]
tests/installed/tasks/install-git.yml

index c72f6b82c3c03bedbb0bc4028c0c97acdb978458..50c8fd776ed72904cfe38c4958c85ebe6a8db027 100644 (file)
@@ -13,3 +13,4 @@
       when: use_git_build
     - import_tasks: tasks/query-host.yml
     - import_tasks: destructive/staged-deploy.yml
+    - import_tasks: destructive/var-mount.yml
diff --git a/tests/installed/destructive/var-mount.yml b/tests/installed/destructive/var-mount.yml
new file mode 100644 (file)
index 0000000..3fe041a
--- /dev/null
@@ -0,0 +1,13 @@
+# https://github.com/ostreedev/ostree/issues/1667
+- name: Set up /var as a mountpoint
+  shell: |
+    set -xeuo pipefail
+    cp -a /var /sysroot/myvar
+    touch /sysroot/myvar/somenewfile
+    echo '/sysroot/myvar /var none bind 0 0' >> /etc/fstab
+- include_tasks: ../tasks/reboot.yml
+- name: Check that /var mountpoint worked
+  shell: |
+    set -xeuo pipefail
+    systemctl status var.mount
+    test -f /var/somenewfile
index 8216afeb1572343392b864088551ec7684e4c2eb..3374cce758eb5b78dd11c99ee09a3afcd64a5677 100644 (file)
@@ -8,6 +8,9 @@
   synchronize: src=build/x86_64/ dest=/root/x86_64/ archive=yes
 - name: Install RPMs
   shell: rpm-ostree override replace /root/x86_64/*.rpm
+# Regenerate to make sure new ostree binaries also make it to the initrd
+- name: Regenerate initramfs
+  shell: rpm-ostree initramfs --enable
 - import_tasks: ../tasks/reboot.yml
 - import_tasks: ../tasks/query-host.yml
 - command: ostree --version