Skip to content

Commit

Permalink
Updated onboardin token generation from ui
Browse files Browse the repository at this point in the history
Signed-off-by: Amrita Mahapatra <49347640+amr1ta@users.noreply.github.com>
  • Loading branch information
amr1ta committed Oct 23, 2024
1 parent 3f17617 commit ea98930
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from ocs_ci.ocs.resources.catalog_source import get_odf_tag_from_redhat_catsrc
from ocs_ci.utility.utils import (
get_latest_release_version,
get_ocp_version,
)
from ocs_ci.ocs.ocp import OCP
from ocs_ci.ocs.ui.validation_ui import ValidationUI
Expand Down Expand Up @@ -96,7 +95,7 @@ def test_onboarding_token_generation_with_limited_storage_quota_from_ui(
if "rhodf" in odf_version:
odf_version = get_odf_tag_from_redhat_catsrc()

ocp_version = get_ocp_version()
ocp_version = get_latest_release_version()
nodepool_replicas = 2

create_hypershift_clusters(
Expand All @@ -107,20 +106,17 @@ def test_onboarding_token_generation_with_limited_storage_quota_from_ui(
nodepool_replicas=nodepool_replicas,
)

log.info("Switch to the hosted cluster")
config.switch_to_cluster_by_name(cluster_name)

server = str(OCP().exec_oc_cmd("whoami --show-server", out_yaml_format=False))
# server = str(OCP().exec_oc_cmd("whoami --show-server", out_yaml_format=False))

assert (
cluster_name in server
), f"Failed to switch to cluster '{cluster_name}' and fetch data"
# assert (
# cluster_name in server
# ), f"Failed to switch to cluster '{cluster_name}' and fetch data"

log.info("Test create onboarding key")
# HostedClients().download_hosted_clusters_kubeconfig_files()

onboarding_token = HostedODF().get_onboarding_key_ui(
storage_quota=(config.ENV_DATA.get("clusters").get("storage_quota"), 4)
storage_quota=(config.ENV_DATA.get("clusters")).get("storage_quota", 4)
)
assert len(onboarding_token), "Failed to get onboarding key"
HostedODF().create_storage_client(onboarding_token=onboarding_token)
Expand Down

0 comments on commit ea98930

Please sign in to comment.