mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-13 06:50:10 +01:00
feat(e2e-test): Add e2e-tests for zfs-localpv (#298)
Signed-off-by: w3aman <aman.gupta@mayadata.io>
This commit is contained in:
parent
53f872fcf1
commit
4e73638b5a
137 changed files with 8745 additions and 0 deletions
40
e2e-tests/utils/k8s/pre_create_app_deploy.yml
Normal file
40
e2e-tests/utils/k8s/pre_create_app_deploy.yml
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue