From Fedora Project Wiki

< User:Roshi‎ | QA/AtomicTests

Revision as of 05:38, 20 November 2014 by Roshi (talk | contribs) (Created page with "{{QA/Test_Case |description=This testcase ensures it's possible to upgrade an Atomic Host. {{Admon/note|Prerequisite|This testcase assumes you have already ran the [https://fe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This testcase ensures it's possible to upgrade an Atomic Host.

Note.png
Prerequisite
This testcase assumes you have already ran the upgrade testcase.

Setup

  1. Ensure you have a booted working Atomic Host you've upgraded at least once.

How to test

  1. Check to make sure you're on an upgraded host.
# rpm-ostree status
  TIMESTAMP (UTC)         ID             OSNAME                 REFSPEC                                                
* 2014-11-13 10:52:06     18e02c4166     fedora-atomic-host     fedora-atomic:fedora-atomic/f21/x86_64/docker-host     
  2014-11-12 22:28:04     1877f1fa64     fedora-atomic-host     fedora-atomic:fedora-atomic/f21/x86_64/docker-host     
# 
# ostree admin status
* fedora-atomic-host 18e02c41666ef5f426bc43d01c4ce1b7ffc0611e993876cf332600e2ad8aa7c0.0
    origin refspec: fedora-atomic:fedora-atomic/f21/x86_64/docker-host
  fedora-atomic-host 1877f1fa64be8bec8adcd43de6bd4b5c39849ec7842c07a6d4c2c2033651cd84.0
    origin refspec: fedora-atomic:fedora-atomic/f21/x86_64/docker-host
  1. Write hash to a file
# cat /ostree/repo/refs/heads/ostree/1/1/0
18e02c41666ef5f426bc43d01c4ce1b7ffc0611e993876cf332600e2ad8aa7c0
# 
# cat /ostree/repo/refs/heads/ostree/1/1/0 > /etc/file2
  1. Roll the host back
rpm-ostree rollback
  1. Reboot the system

Expected Results

  1. Status should be reverted
# rpm-ostree status
  TIMESTAMP (UTC)         ID             OSNAME                 REFSPEC                                                
* 2014-11-12 22:28:04     1877f1fa64     fedora-atomic-host     fedora-atomic:fedora-atomic/f21/x86_64/docker-host     
  2014-11-13 10:52:06     18e02c4166     fedora-atomic-host     fedora-atomic:fedora-atomic/f21/x86_64/docker-host
  1. file2 should not exist and file1 should
# cat /etc/file1 
1877f1fa64be8bec8adcd43de6bd4b5c39849ec7842c07a6d4c2c2033651cd84
# cat /etc/file2
cat: /etc/file2: No such file or directory
  1. Docker containers should still run
# docker run -it --rm busybox true && echo "PASS"