Skip to content

Commit

Permalink
Merge pull request #9944 from jilju/fix_9943
Browse files Browse the repository at this point in the history
Update snapshot fixture to handle provider mode client
  • Loading branch information
vavuthu authored Jun 14, 2024
2 parents 88ff6f8 + b6e7959 commit 8977d25
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4248,6 +4248,22 @@ def factory(
):
restore_pvc_yaml = restore_pvc_yaml or constants.CSI_LVM_PVC_RESTORE_YAML
no_interface = True
elif (
ocsci_config.ENV_DATA["platform"].lower() in constants.HCI_PC_OR_MS_PLATFORM
):
storageclass = storageclass or vol_snapshot_class
storageclass_obj = OCP(kind="storageclass", resource_name=storageclass)
sc_data = storageclass_obj.get(resource_name=storageclass)
if sc_data["provisioner"] == constants.RBD_PROVISIONER:
restore_pvc_yaml = (
restore_pvc_yaml or constants.CSI_RBD_PVC_RESTORE_YAML
)
interface = constants.CEPHBLOCKPOOL
elif sc_data["provisioner"] == constants.CEPHFS_PROVISIONER:
restore_pvc_yaml = (
restore_pvc_yaml or constants.CSI_CEPHFS_PVC_RESTORE_YAML
)
interface = constants.CEPHFILESYSTEM

restored_pvc = create_restore_pvc(
sc_name=storageclass,
Expand Down

0 comments on commit 8977d25

Please sign in to comment.