Skip to content
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
4 changes: 2 additions & 2 deletions tests/storage/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def assert_pvc_snapshot_clone_annotation(pvc, storage_class):
clone_type_annotation_str = f"{Resource.ApiGroup.CDI_KUBEVIRT_IO}/cloneType"
clone_type_annotation = pvc.instance["metadata"].get("annotations").get(clone_type_annotation_str)
# For snapshot capable storage, 'csi-clone' may be set in the StorageProfile
expected_clone_type_annotation = StorageProfile(name=storage_class).instance.status.cloneStrategy
expected_clone_type_annotation = StorageProfile(name=storage_class, client=pvc.client).instance.status.cloneStrategy
Comment thread
RoniKishner marked this conversation as resolved.
Comment thread
jpeimer marked this conversation as resolved.
Comment thread
RoniKishner marked this conversation as resolved.
assert clone_type_annotation == expected_clone_type_annotation, (
f"{clone_type_annotation_str}: {clone_type_annotation}, expected: '{expected_clone_type_annotation}'"
)
Expand Down Expand Up @@ -451,7 +451,7 @@ def assert_num_files_in_pod(pod, expected_num_of_files):

def assert_use_populator(pvc, storage_class, cluster_csi_drivers_names):
expected_use_populator_value = (
StorageClass(name=storage_class).instance.get("provisioner") in cluster_csi_drivers_names
StorageClass(name=storage_class, client=pvc.client).instance.get("provisioner") in cluster_csi_drivers_names
)
assert pvc.use_populator == expected_use_populator_value
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Expand Down
4 changes: 2 additions & 2 deletions utilities/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ def create_dv(
# Make sure URL exists
validate_file_exists_in_url(url=url)
if not secret:
secret = utilities.artifactory.get_artifactory_secret(namespace=namespace)
secret = utilities.artifactory.get_artifactory_secret(namespace=namespace, client=client)
artifactory_secret = secret
if not cert_configmap:
cert_created = utilities.artifactory.get_artifactory_config_map(namespace=namespace)
cert_created = utilities.artifactory.get_artifactory_config_map(namespace=namespace, client=client)
cert_configmap = cert_created.name

with DataVolume(
Expand Down
Loading