zfs-localpv/e2e-tests/experiments/functional/zv-property-runtime-modify/README.md
Aman Gupta 4e73638b5a
feat(e2e-test): Add e2e-tests for zfs-localpv (#298)
Signed-off-by: w3aman <aman.gupta@mayadata.io>
2021-06-09 21:21:39 +05:30

1.9 KiB
Raw Permalink Blame History

About this experiment

This experiment verifies runtime modification of zvolume properties which were set via storage-class.

Supported platforms:

K8s : 1.18+

OS : Ubuntu, CentOS

ZFS : 0.7, 0.8

Entry-Criteria

  • K8s cluster should be in healthy state including all desired nodes in ready state.
  • zfs-controller and node-agent daemonset pods should be in running state.

Steps performed

  • Get the zvolume name and then obtain properties like compression, dedup from that zvolume.
  • After that update these parameter properties and apply the zvolume yaml.
  • Verify update values from zvolume and from node as well where volume was provisioned.

How to run

  • This experiment accepts the parameters in form of kubernetes job environmental variables.
  • For running this experiment of run time modification of zv properties, clone openens/zfs-localpv[https://github.com/openebs/zfs-localpv] repo and then first apply rbac and crds for e2e-framework.
kubectl apply -f zfs-localpv/e2e-tests/hack/rbac.yaml
kubectl apply -f zfs-localpv/e2e-tests/hack/crds.yaml

then update the needed test specific values in run_e2e_test.yml file and create the kubernetes job.

kubectl create -f run_e2e_test.yml

All the env variables description is provided with the comments in the same file. After creating kubernetes job, when the jobs pod is instantiated, we can see the logs of that pod which is executing the test-case.

kubectl get pods -n e2e
kubectl logs -f <zv-property-runtime-modify-xxxxx-xxxxx> -n e2e

To get the test-case result, get the corresponding e2e custom-resource e2eresult (short name: e2er ) and check its phase (Running or Completed) and result (Pass or Fail).

kubectl get e2er
kubectl get e2er zv-property-runtime-modify -n e2e --no-headers -o custom-columns=:.spec.testStatus.phase
kubectl get e2er zv-property-runtime-modify -n e2e --no-headers -o custom-columns=:.spec.testStatus.result