Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: osdfm dynatrace tenant label removal #51471

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1687,10 +1687,36 @@ function test_delete_mc () {

##################################################################

###### test: Fleet Manager should not label SCs with Dynatrace Tenant ID (OCPQE-21268) ######

function test_do_not_label_with_dynatrace_tenant_id () {
echo "[OCPQE-21268] - Fleet Manager should not label SCs with Dynatrace Tenant ID"
TEST_PASSED=true
sc_cluster_id=$(cat "${SHARED_DIR}/ocm-sc-id")

DT_LABEL_KEY="sre-capabilities.dtp.tenant"

SUBSCRIPTION_HREF=$(ocm get /api/clusters_mgmt/v1/clusters/"$sc_cluster_id" | jq -r .subscription.href)

LABEL_COUNT=$(ocm get "$SUBSCRIPTION_HREF"/labels | grep -c "$DT_LABEL_KEY")

if [ "$LABEL_COUNT" -ne 0 ]; then
TEST_PASSED=false
echo "ERROR. Unexpected label: 'DT_LABEL_KEY' found in subscription for SC"
fi
update_results "OCPQE-21268" $TEST_PASSED
}

###### end of test: Fleet Manager should not label SCs with Dynatrace Tenant ID (OCPQE-21268) ######

##################################################################

# Test all cases and print results

test_monitoring_disabled

test_do_not_label_with_dynatrace_tenant_id

# temporarily disabling this test, as autoscaling work is ongoing and it won't pass
# test_autoscaler

Expand Down