feat(e2e-test): Add e2e-tests for zfs-localpv (#298)

Signed-off-by: w3aman <aman.gupta@mayadata.io>
This commit is contained in:
Aman Gupta 2021-06-09 21:21:39 +05:30 committed by GitHub
parent 53f872fcf1
commit 4e73638b5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
137 changed files with 8745 additions and 0 deletions

View file

@ -0,0 +1,40 @@
---
- block:
- name: Check whether the provider storageclass is present
shell: kubectl get sc "{{ lookup('env','STORAGE_CLASS') }}"
args:
executable: /bin/bash
register: result
failed_when: "result.rc != 0"
- name: Replace the storageclass placeholder with test specific value
replace:
path: "{{ application }}"
regexp: "testclass"
replace: "{{ lookup('env','STORAGE_CLASS') }}"
- name: Replace the application pvc placeholder with test specific value
replace:
path: "{{ application }}"
regexp: "testclaim"
replace: "{{ lookup('env','APP_PVC') }}"
- name: Replace the persistent volume capcity placeholder with test specific value
replace:
path: "{{ application }}"
regexp: "teststorage"
replace: "{{ lookup('env','PV_CAPACITY') }}"
- name: Get the application label value from env
set_fact:
app_lkey: "{{ app_label.split('=')[0] }}"
app_lvalue: "{{ app_label.split('=')[1] }}"
- name: Replace the application label placeholder in deployment spec
replace:
path: "{{ application }}"
regexp: "lkey: lvalue"
replace: "{{ app_lkey }}: {{ app_lvalue }}"
# Create test specific namespace
- include_tasks: /e2e-tests/utils/k8s/create_ns.yml