mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-28 18:34:42 +00:00
tests: remove old openshift tests (#311)
Older openshift test cases are no longer valid for this collection. Removing them for now. Fixes: #300 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -67,33 +67,6 @@
|
|||||||
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
||||||
playbook_namespace: ansible-test-k8s-config-getter
|
playbook_namespace: ansible-test-k8s-config-getter
|
||||||
|
|
||||||
- file:
|
|
||||||
path: "{{ virtualenv }}"
|
|
||||||
state: absent
|
|
||||||
no_log: yes
|
|
||||||
|
|
||||||
# Test graceful failure for older versions of openshift
|
|
||||||
- name: Get the Python version
|
|
||||||
setup:
|
|
||||||
filter: ansible_python_version
|
|
||||||
|
|
||||||
- when: ansible_python_version is version('3.7', '<')
|
|
||||||
block:
|
|
||||||
- pip:
|
|
||||||
name:
|
|
||||||
- openshift==0.6.0
|
|
||||||
- kubernetes==6.0.0
|
|
||||||
- coverage
|
|
||||||
virtualenv: "{{ virtualenv }}"
|
|
||||||
virtualenv_command: "{{ virtualenv_command }}"
|
|
||||||
virtualenv_site_packages: no
|
|
||||||
|
|
||||||
- include_tasks: older_openshift_fail.yml
|
|
||||||
vars:
|
|
||||||
ansible_python_interpreter: "{{ virtualenv_interpreter }}"
|
|
||||||
playbook_namespace: ansible-test-k8s-older-openshift
|
|
||||||
|
|
||||||
|
|
||||||
- file:
|
- file:
|
||||||
path: "{{ virtualenv }}"
|
path: "{{ virtualenv }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
---
|
|
||||||
# TODO: Not available in ansible-base
|
|
||||||
# - python_requirements_info:
|
|
||||||
# dependencies:
|
|
||||||
# - openshift==0.6.0
|
|
||||||
# - kubernetes==6.0.0
|
|
||||||
|
|
||||||
# append_hash
|
|
||||||
- name: use append_hash with ConfigMap
|
|
||||||
k8s:
|
|
||||||
definition:
|
|
||||||
metadata:
|
|
||||||
name: config-map-test
|
|
||||||
namespace: "{{ playbook_namespace }}"
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
data:
|
|
||||||
hello: world
|
|
||||||
append_hash: yes
|
|
||||||
ignore_errors: yes
|
|
||||||
register: k8s_append_hash
|
|
||||||
|
|
||||||
- name: assert that append_hash fails gracefully
|
|
||||||
assert:
|
|
||||||
that:
|
|
||||||
- k8s_append_hash is failed
|
|
||||||
- "'Failed to import the required Python library (openshift >= 0.7.2)' in k8s_append_hash.msg"
|
|
||||||
- "'. This is required for append_hash.' in k8s_append_hash.msg"
|
|
||||||
|
|
||||||
# validate
|
|
||||||
- name: attempt to use validate with older openshift
|
|
||||||
k8s:
|
|
||||||
definition:
|
|
||||||
metadata:
|
|
||||||
name: config-map-test
|
|
||||||
namespace: "{{ playbook_namespace }}"
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
data:
|
|
||||||
hello: world
|
|
||||||
validate:
|
|
||||||
fail_on_error: yes
|
|
||||||
ignore_errors: yes
|
|
||||||
register: k8s_validate
|
|
||||||
|
|
||||||
- name: assert that validate fails gracefully
|
|
||||||
assert:
|
|
||||||
that:
|
|
||||||
- k8s_validate is failed
|
|
||||||
- "k8s_validate.msg == 'openshift >= 0.8.0 is required for validate'"
|
|
||||||
|
|
||||||
# apply
|
|
||||||
- name: attempt to use apply with older openshift
|
|
||||||
k8s:
|
|
||||||
definition:
|
|
||||||
metadata:
|
|
||||||
name: config-map-test
|
|
||||||
namespace: "{{ playbook_namespace }}"
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
data:
|
|
||||||
hello: world
|
|
||||||
apply: yes
|
|
||||||
ignore_errors: yes
|
|
||||||
register: k8s_apply
|
|
||||||
|
|
||||||
- name: assert that apply fails gracefully
|
|
||||||
assert:
|
|
||||||
that:
|
|
||||||
- k8s_apply is failed
|
|
||||||
- "k8s_apply.msg.startswith('Failed to import the required Python library (openshift >= 0.9.2)')"
|
|
||||||
Reference in New Issue
Block a user