summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_availability_missing_required.yml14
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_update_dep_missing.yml9
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_broken.yml9
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_disabled.yml9
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_unreachable.yml9
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_version_matches.yml12
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_version_mismatches.yml15
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/package_version_multiple.yml13
-rw-r--r--test/integration/openshift_health_checker/preflight/playbooks/tasks/enable_repo.yml2
9 files changed, 76 insertions, 16 deletions
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_availability_missing_required.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_availability_missing_required.yml
index 31d0d521e..a557282b4 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_availability_missing_required.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_availability_missing_required.yml
@@ -1,4 +1,5 @@
---
+# NOTE: this test is probably superfluous since openshift_version already does it
- include: ../../setup_container.yml
vars:
image: preflight-aos-package-checks
@@ -7,11 +8,22 @@
- name: Fail as required packages cannot be installed
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2" }
+
roles:
- openshift_health_checker
- tasks:
+
+ post_tasks:
- block:
+ # put the repo back to disabled
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2", repo_enabled: 0 }
+
- action: openshift_health_check
args:
checks: [ 'package_availability' ]
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_update_dep_missing.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_update_dep_missing.yml
index 7b6e71f91..0929b73ce 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_update_dep_missing.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_update_dep_missing.yml
@@ -8,9 +8,16 @@
- name: Fails when a dependency required for update is missing
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2" }
+
roles:
- openshift_health_checker
- tasks:
+
+ post_tasks:
- block:
- include: tasks/enable_repo.yml
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_broken.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_broken.yml
index c2e9c3866..f8790358a 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_broken.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_broken.yml
@@ -8,9 +8,16 @@
- name: Fails when a repo definition is completely broken
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2" }
+
roles:
- openshift_health_checker
- tasks:
+
+ post_tasks:
- block:
- include: tasks/enable_repo.yml
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_disabled.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_disabled.yml
index 98d41aad4..e2bb84715 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_disabled.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_disabled.yml
@@ -8,9 +8,16 @@
- name: Succeeds when nothing blocks a yum update
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2" }
+
roles:
- openshift_health_checker
- tasks:
+
+ post_tasks:
- block:
- action: openshift_health_check
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_unreachable.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_unreachable.yml
index 60ab9942a..28efdd81d 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_unreachable.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_update_repo_unreachable.yml
@@ -8,9 +8,16 @@
- name: Fails when repo content is not available
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2" }
+
roles:
- openshift_health_checker
- tasks:
+
+ post_tasks:
- block:
- include: tasks/enable_repo.yml
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_version_matches.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_version_matches.yml
index cd60dee5a..66d43d809 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_version_matches.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_version_matches.yml
@@ -8,13 +8,17 @@
- name: Success when AOS version matches openshift_release
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2" }
+
roles:
- openshift_health_checker
- tasks:
- - block:
- - include: tasks/enable_repo.yml
- vars: { repo_name: "ose-3.2" }
+ post_tasks:
+ - block:
- action: openshift_health_check
args:
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_version_mismatches.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_version_mismatches.yml
index 5939a1ef1..c26413009 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_version_mismatches.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_version_mismatches.yml
@@ -1,4 +1,5 @@
---
+# NOTE: this test is probably superfluous since openshift_version already does it
- include: ../../setup_container.yml
vars:
image: preflight-aos-package-checks
@@ -8,14 +9,24 @@
- name: Failure when AOS version doesn't match openshift_release
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.3" }
+
roles:
- openshift_health_checker
- tasks:
+
+ post_tasks:
- block:
+ # put the repo back to disabled
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.3", repo_enabled: 0 }
+ # test with wrong repo enabled
- include: tasks/enable_repo.yml
vars: { repo_name: "ose-3.2" }
-
- action: openshift_health_check
args:
checks: [ 'package_version' ]
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/package_version_multiple.yml b/test/integration/openshift_health_checker/preflight/playbooks/package_version_multiple.yml
index be0f9bc7a..c941413de 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/package_version_multiple.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/package_version_multiple.yml
@@ -7,14 +7,19 @@
- name: Fails when multiple AOS versions are available
hosts: all
+ pre_tasks:
+
+ # run before roles to prevent openshift_version breaking
+ - include: tasks/enable_repo.yml
+ vars: { repo_name: "ose-3.2" }
+
roles:
- openshift_health_checker
- tasks:
- - block:
- - include: tasks/enable_repo.yml
- vars: { repo_name: "ose-3.2" }
+ post_tasks:
+ - block:
+ # enable repo with extra minor version available
- include: tasks/enable_repo.yml
vars: { repo_name: "ose-3.3" }
diff --git a/test/integration/openshift_health_checker/preflight/playbooks/tasks/enable_repo.yml b/test/integration/openshift_health_checker/preflight/playbooks/tasks/enable_repo.yml
index aaacf205e..a41cb3c9a 100644
--- a/test/integration/openshift_health_checker/preflight/playbooks/tasks/enable_repo.yml
+++ b/test/integration/openshift_health_checker/preflight/playbooks/tasks/enable_repo.yml
@@ -6,4 +6,4 @@
dest: /etc/yum.repos.d/{{ repo_name }}.repo
section: "{{ repo_name }}"
option: enabled
- value: 1
+ value: "{{ repo_enabled | default(1) }}"