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

Longw/fix conformance test #1350

Merged
merged 8 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from 6 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
18 changes: 9 additions & 9 deletions test/e2e/src/core/e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,24 @@ waitForArcK8sClusterCreated() {
}

waitForCIExtensionInstalled() {
installedState=false
provisioningState=false
max_retries=60
sleep_seconds=10
for i in $(seq 1 $max_retries)
do
echo "iteration: ${i}, clustername: ${CLUSTER_NAME}, resourcegroup: ${RESOURCE_GROUP}"
installState=$(az k8s-extension show --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --name azuremonitor-containers --query installState -o json)
installState=$(echo $installState | tr -d '"' | tr -d '"\r\n')
echo "extension install state: ${installState}"
if [ ! -z "$installState" ]; then
if [ "${installState}" == "Installed" ]; then
installedState=true
provisioningState=$(az k8s-extension show --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --name azuremonitor-containers --query provisioningState -o json)
provisioningState=$(echo $provisioningState | tr -d '"' | tr -d '"\r\n')
echo "extension install state: ${provisioningState}"
if [ ! -z "$provisioningState" ]; then
if [ "${provisioningState}" == "Installed" ]; then
provisioningState=true
break
fi
fi
fiKUBE_EVENTS_QUERY
sleep ${sleep_seconds}
done
echo "container insights extension installedState: $installedState"
echo "container insights extension provisioningState: $provisioningState"
}

validateCommonParameters() {
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/src/tests/test_e2e_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def test_e2e_workflows(env_dict):
pytest.fail("rowCount should be greater than for cluster: {0} for workflow: {1} ".format(clusterResourceId, 'KUBE_SERVICES'))

# KubeEvents
# only the kube events with !normal event type will be collected
query = constants.KUBE_EVENTS_QUERY.format(queryTimeInterval)
params = { 'query': query}
result = requests.get(queryUrl, params=params, headers=Headers)
Expand All @@ -128,7 +129,7 @@ def test_e2e_workflows(env_dict):

rowCount = result.json()['tables'][0]['rows'][0][0]
if not rowCount:
pytest.fail("rowCount should be greater than for cluster: {0} for workflow: {1} ".format(clusterResourceId, 'KUBE_EVENTS'))
print("rowCount should be greater or equal than for cluster: {0} for workflow: {1} ".format(clusterResourceId, 'KUBE_EVENTS'))

# Container Node Inventory
query = constants.CONTAINER_NODE_INVENTORY_QUERY.format(queryTimeInterval)
Expand Down
Loading