Skip to content

Commit

Permalink
adds ci to test the subvolume command
Browse files Browse the repository at this point in the history
this commit adds a ci to test the
subvolume ls and delete command

Signed-off-by: yati1998 <ypadia@redhat.com>
  • Loading branch information
yati1998 committed Dec 11, 2023
1 parent f134ed4 commit 92810dc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ jobs:
set -ex
kubectl rook-ceph rbd ls replicapool
- name: Subvolume command
run: |
set -ex
kubectl rook-ceph ceph fs subvolume create myfs test-subvol group-a
kubectl rook-ceph subvolume ls
kubectl rook-ceph subvolume ls --stale
kubectl rook-ceph subvolume delete test-subvol myfs group-a
- name: Get mon endpoints
run: |
set -ex
Expand Down Expand Up @@ -199,6 +207,14 @@ jobs:
set -ex
kubectl rook-ceph --operator-namespace test-operator -n test-cluster rbd ls replicapool
- name: Subvolume command
run: |
set -ex
kubectl rook-ceph --operator-namespace test-operator -n test-cluster ceph fs subvolume create myfs test-subvol group-a
kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume ls
kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume ls --stale
kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume delete test-subvol myfs group-a
- name: Get mon endpoints
run: |
set -ex
Expand Down
7 changes: 7 additions & 0 deletions tests/github-action-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ deploy_rook() {
kubectl create -f cluster-test.yaml
wait_for_pod_to_be_ready_state_default
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/filesystem-test.yaml
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/subvolumegroup.yaml
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/toolbox.yaml
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/csi/rbd/storageclass-test.yaml
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/csi/rbd/pvc.yaml
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/csi/cephfs/pvc.yaml
}

deploy_rook_in_custom_namespace() {
Expand All @@ -69,6 +71,11 @@ deploy_rook_in_custom_namespace() {
sed -i "s|provisioner: rook-ceph.rbd.csi.ceph.com |provisioner: test-operator.rbd.csi.ceph.com |g" storageclass-test.yaml
deploy_with_custom_ns "$1" "$2" storageclass-test.yaml
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/csi/rbd/pvc.yaml
curl -f https://raw.github.com/rook/rook/master/deploy/examples/filesystem-test.yaml -o filesystem.yaml
deploy_with_custom_ns "$1" "$2" filesystem.yaml
curl -f https://raw.github.com/rook/rook/master/deploy/examples/subvolumegroup.yaml -o subvolumegroup.yaml
deploy_with_custom_ns "$1" "$2" subvolumegroup.yaml
kubectl create -f https://raw.github.com/rook/rook/master/deploy/examples/csi/cephfs/pvc.yaml

curl -f https://raw.github.com/rook/rook/master/deploy/examples/toolbox.yaml -o toolbox.yaml
deploy_with_custom_ns "$1" "$2" toolbox.yaml
Expand Down

0 comments on commit 92810dc

Please sign in to comment.