Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(e2e-tests): Add e2e-test for lvm-localpv driver provisioning #29

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e-tests/apps/busybox/deployers/busybox_statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ spec:
storageClassName: testclass
resources:
requests:
storage: teststorage
storage: teststorage
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: litmus-busybox-deploy-
namespace: litmus
generateName: busybox-deploy-
namespace: e2e
spec:
template:
metadata:
name: litmus
name: busybox-deploy
labels:
app: busybox-litmus
app: busybox
spec:
serviceAccountName: litmus
serviceAccountName: e2e
restartPolicy: Never
containers:
- name: ansibletest
Expand All @@ -23,33 +23,33 @@ spec:

# Name of the storage class to use for volume provisioning
- name: STORAGE_CLASS
value: ''
value: 'openebs-lvmsc'

# This is the namespace where busybox application will be deployed
- name: APP_NAMESPACE
value: ''
value: 'busybox'

# Application label for busybox deployment/statefulset in `key=value` format
- name: APP_LABEL
value: ''
value: 'app=busybox'

# Application PVC name
- name: APP_PVC
value: ''
value: 'busybox-pvc'

# Persistent volume storage capacity (for e.g, 5Gi)
- name: PV_CAPACITY
value: ''
value: '5Gi'

# Use: `statefuleset` to deploy busybox application as statefulset
# Use: `deployment` to deploy busybox application as deployment
- name: DEPLOY_TYPE
value: ''
value: 'deployment'

# Use: `provision` to deploy the application
# Use: `deprovision` to deprovision the application
- name: ACTION
value: ''
value: 'provision'

command: ["/bin/bash"]
args: ["-c", "ansible-playbook ./e2e-tests/apps/busybox/deployers/test.yml -i /etc/ansible/hosts -v; exit 0"]
args: ["-c", "ansible-playbook ./e2e-tests/apps/busybox/deployers/test.yml -i /etc/ansible/hosts -v; exit 0"]
10 changes: 5 additions & 5 deletions e2e-tests/apps/busybox/deployers/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
## Generating the testname for deployment
- include_tasks: /e2e-tests/hack/create_testname.yml

## RECORD START-OF-TEST IN LITMUS RESULT CR
- include_tasks: /e2e-tests/hack/update_litmus_result_resource.yml
## RECORD START-OF-TEST IN e2e RESULT CR
- include_tasks: /e2e-tests/hack/update_e2e_result_resource.yml
vars:
status: 'SOT'

Expand Down Expand Up @@ -72,7 +72,7 @@
flag: "Fail"

always:
## RECORD END-OF-TEST IN LITMUS RESULT CR
- include_tasks: /e2e-tests/hack/update_litmus_result_resource.yml
## RECORD END-OF-TEST IN e2e RESULT CR
- include_tasks: /e2e-tests/hack/update_e2e_result_resource.yml
vars:
status: 'EOT'
status: 'EOT'
4 changes: 1 addition & 3 deletions e2e-tests/apps/busybox/deployers/test_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ app_pvc: "{{ lookup('env','APP_PVC') }}"

deploy_type: "{{ lookup('env','DEPLOY_TYPE') }}"

action: "{{ lookup('env','ACTION') }}"


action: "{{ lookup('env','ACTION') }}"
3 changes: 1 addition & 2 deletions e2e-tests/apps/busybox/liveness/busybox_liveness.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# Source: openebs/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -78,4 +77,4 @@ spec:
value: pod-name

command: ["/bin/bash"]
args: ["-c", "./liveness.sh; exit 0"]
args: ["-c", "./liveness.sh; exit 0"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: litmus-busybox-liveness-
namespace: litmus
generateName: busybox-liveness-
namespace: e2e
spec:
activeDeadlineSeconds: 5400
template:
metadata:
name: litmus-busybox-liveness
namespace: litmus
name: busybox-liveness
namespace: e2e
labels:
liveness: busybox-liveness

# label used for mass-liveness check upon infra-chaos
infra-aid: liveness

spec:
serviceAccountName: litmus
serviceAccountName: e2e
restartPolicy: Never

containers:
Expand All @@ -42,16 +42,16 @@ spec:

# This is the namespace where busybox application is running
- name: APP_NAMESPACE
value: ''
value: 'busybox'

# Application label for busybox in `key=value` format
- name: APP_LABEL
value: ''
value: 'app=busybox'

# Use: `provision` to apply the liveness-probe checks for busybox application
# Use: `deprovision` to deprovision the liveness-probe
- name: ACTION
value: ''
value: 'provision'

command: ["/bin/bash"]
args: ["-c", "ansible-playbook ./e2e-tests/apps/busybox/liveness/test.yml -i /etc/ansible/hosts -v; exit 0"]
args: ["-c", "ansible-playbook ./e2e-tests/apps/busybox/liveness/test.yml -i /etc/ansible/hosts -v; exit 0"]
8 changes: 4 additions & 4 deletions e2e-tests/apps/busybox/liveness/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

when: lookup('env','RUN_ID')

## RECORD START-OF-TEST IN LITMUS RESULT CR
- include_tasks: /e2e-tests/hack/update_litmus_result_resource.yml
## RECORD START-OF-TEST IN e2e RESULT CR
- include_tasks: /e2e-tests/hack/update_e2e_result_resource.yml
vars:
status: 'SOT'

Expand Down Expand Up @@ -89,8 +89,8 @@

always:

## RECORD END-OF-TEST IN LITMUS RESULT CR
- include_tasks: /e2e-tests/hack/update_litmus_result_resource.yml
## RECORD END-OF-TEST IN e2e RESULT CR
- include_tasks: /e2e-tests/hack/update_e2e_result_resource.yml
vars:
status: 'EOT'

2 changes: 1 addition & 1 deletion e2e-tests/apps/percona/deployers/percona.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ spec:
- port: 3306
targetPort: 3306
selector:
lkey: lvalue
lkey: lvalue
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: litmus-percona-deploy-
namespace: litmus
generateName: percona-deploy-
namespace: e2e
spec:
template:
metadata:
name: litmus
name: percona-deploy
labels:
app: percona-deployment

spec:
serviceAccountName: litmus
serviceAccountName: e2e
restartPolicy: Never
containers:
- name: ansibletest
Expand All @@ -25,29 +25,28 @@ spec:

# Name of the storage class to use for volume provisioning
- name: STORAGE_CLASS
value: ''
value: 'openebs-lvmsc'

# This is the namespace where percona application will be deployed
- name: APP_NAMESPACE
value: ''
value: 'percona'

# Application label for percona deployment in `key=value` format
- name: APP_LABEL
value: ''
value: 'app=percona'

# Application PVC name
- name: APP_PVC
value: ''
value: 'percona-pvc'

# Persistent volume storage capacity (for e.g, 5Gi)
- name: PV_CAPACITY
value: ''
value: '5Gi'

# Use: `provision` to deploy the application
# Use: `deprovision` to deprovision the application
- name: ACTION
value: ''
value: 'provision'

command: ["/bin/bash"]
args: ["-c", "ansible-playbook ./e2e-tests/apps/percona/deployers/test.yml -i /etc/ansible/hosts -v; exit 0"]

args: ["-c", "ansible-playbook ./e2e-tests/apps/percona/deployers/test.yml -i /etc/ansible/hosts -v; exit 0"]
8 changes: 4 additions & 4 deletions e2e-tests/apps/percona/deployers/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
## Generating the testname for deployment
- include_tasks: /e2e-tests/hack/create_testname.yml

## RECORD START-OF-TEST IN LITMUS RESULT CR
- include_tasks: "/e2e-tests/hack/update_litmus_result_resource.yml"
## RECORD START-OF-TEST IN e2e RESULT CR
- include_tasks: "/e2e-tests/hack/update_e2e_result_resource.yml"
vars:
status: 'SOT'

Expand Down Expand Up @@ -51,7 +51,7 @@
flag: "Fail"

always:
## RECORD END-OF-TEST IN LITMUS RESULT CR
- include_tasks: /e2e-tests/hack/update_litmus_result_resource.yml
## RECORD END-OF-TEST IN e2e RESULT CR
- include_tasks: /e2e-tests/hack/update_e2e_result_resource.yml
vars:
status: 'EOT'
2 changes: 1 addition & 1 deletion e2e-tests/apps/percona/deployers/test_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ app_label: "{{ lookup('env','APP_LABEL') }}"

app_pvc: "{{ lookup('env','APP_PVC') }}"

action: "{{ lookup('env','ACTION') }}"
action: "{{ lookup('env','ACTION') }}"
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: litmus-percona-loadgen-
namespace: litmus
generateName: percona-loadgen-
namespace: e2e
spec:
template:
metadata:
name: percona-loadgen
namespace: litmus
namespace: e2e
labels:
loadgen: percona-loadjob
spec:
serviceAccountName: litmus
serviceAccountName: e2e
restartPolicy: Never
containers:
- name: ansibletest
Expand All @@ -24,10 +24,10 @@ spec:

# This is the namespace where percona application is running
- name: APP_NAMESPACE
value: ''
value: 'percona'

- name: APP_LABEL
value: ''
value: 'app=percona'

- name: LOADGEN_LABEL
value: loadgen=percona-loadgen
Expand Down Expand Up @@ -57,4 +57,4 @@ spec:
value: "10"

command: ["/bin/bash"]
args: ["-c", "ansible-playbook ./e2e-tests/apps/percona/workload/test.yml -i /etc/ansible/hosts -v; exit 0"]
args: ["-c", "ansible-playbook ./e2e-tests/apps/percona/workload/test.yml -i /etc/ansible/hosts -v; exit 0"]
8 changes: 4 additions & 4 deletions e2e-tests/apps/percona/workload/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

when: lookup('env','RUN_ID')

# RECORD START-OF-TEST IN LITMUS RESULT CR
- include_tasks: /e2e-tests/hack/update_litmus_result_resource.yml
# RECORD START-OF-TEST IN e2e RESULT CR
- include_tasks: /e2e-tests/hack/update_e2e_result_resource.yml
vars:
status: 'SOT'

Expand Down Expand Up @@ -83,7 +83,7 @@
flag: "Fail"

always:
## RECORD END-OF-TEST IN LITMUS RESULT CR
- include_tasks: /e2e-tests/hack/update_litmus_result_resource.yml
## RECORD END-OF-TEST IN e2e RESULT CR
- include_tasks: /e2e-tests/hack/update_e2e_result_resource.yml
vars:
status: 'EOT'
2 changes: 1 addition & 1 deletion e2e-tests/apps/percona/workload/test_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ test_warmup_period: "{{ lookup('env','TPCC_WARMUP_PERIOD') }}"

test_interval: "{{ lookup('env','LOAD_INTERVAL') }}"

tpcc_conf: tpcc.conf
tpcc_conf: tpcc.conf
2 changes: 1 addition & 1 deletion e2e-tests/apps/percona/workload/tpcc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"warmup_period": "test_warmup_period",
"run_duration": "test_duration",
"interval": "test_interval"
}
}
2 changes: 1 addition & 1 deletion e2e-tests/apps/percona/workload/tpcc_bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ spec:
volumes:
- name: tpcc-configmap
configMap:
name: tpcc-config
name: tpcc-config
Loading