diff --git a/features/networking/operator.feature b/features/networking/operator.feature index e8524221c8..cfa05fbd3b 100644 --- a/features/networking/operator.feature +++ b/features/networking/operator.feature @@ -23,9 +23,12 @@ Feature: Operator related networking scenarios Given the master version >= "4.0" #Getting OCP version Given evaluation of `cluster_version('version').version` is stored in the :ocp_version clipboard - #Making sure that operator is not Failing before proceesing further steps - And evaluation of `cluster_operator('network').condition(type: 'Failing')` is stored in the :failing_status_before_patch clipboard - Then the expression should be true> cb.failing_status_before_patch["status"]=="False" + #Making sure that operator is not Degraded before proceesing further steps + And evaluation of `cluster_operator('network').condition(type: 'Degraded')` is stored in the :degraded_status_before_patch clipboard + Then the expression should be true> cb.Degraded_status_before_patch["status"]=="False" + #Making sure that operator is not Degraded before proceesing further steps + And evaluation of `cluster_operator('network').condition(type: 'Degraded')` is stored in the :degraded_status_before_patch clipboard + Then the expression should be true> cb.Degraded_status_before_patch["status"]=="False" #Editing networks.config.openshift.io cluster to reflect bad config like changing networktype from OpenShiftSDN to OpenShift When I run the :patch admin command with: | resource | networks.config.openshift.io | @@ -34,7 +37,7 @@ Feature: Operator related networking scenarios | type | merge | Then the step should succeed - #Registering clean-up steps to move networkType back to OpenShiftSDN and to check Failing status is False before test exits + #Registering clean-up steps to move networkType back to OpenShiftSDN and to check Degraded status is False before test exits Given I register clean-up steps: """ When I run the :patch admin command with: @@ -44,13 +47,13 @@ Feature: Operator related networking scenarios | type | merge | Then the step should succeed 20 seconds have passed - evaluation of `cluster_operator('network').condition(type: 'Failing',cached: false)` is stored in the :failing_status clipboard - the expression should be true> cb.failing_status["status"]=="False" + evaluation of `cluster_operator('network').condition(type: 'Degraded',cached: false)` is stored in the :degraded_status clipboard + the expression should be true> cb.degraded_status["status"]=="False" """ - #Normally it takes 5-10 seconds for network config update to reconcile across the cluster but taking 20 seconds wait to make sure that Failing status becomes True post bad patch + #Normally it takes 5-10 seconds for network config update to reconcile across the cluster but taking 20 seconds wait to make sure that Degraded status becomes True post bad patch Given 20 seconds have passed - And evaluation of `cluster_operator('network').condition(type: 'Failing',cached: false)` is stored in the :failing_status_post_patch clipboard - Then the expression should be true> cb.failing_status_post_patch["status"]=="True" + And evaluation of `cluster_operator('network').condition(type: 'Degraded',cached: false)` is stored in the :degraded_status_post_patch clipboard + Then the expression should be true> cb.degraded_status_post_patch["status"]=="True" And the expression should be true> cluster_operator('network').version_exists?(version: cb.ocp_version) # @author bmeng@redhat.com @@ -60,9 +63,9 @@ Feature: Operator related networking scenarios Given the master version >= "4.0" # Check the operator object has version Given the expression should be true> cluster_operator('network').versions.length > 0 - # Check the operator object has status for Failing|Progressing|Available + # Check the operator object has status for Degraded|Progressing|Available And the expression should be true> cluster_operator('network').condition(type: 'Available')['status'] == "True" - And the expression should be true> cluster_operator('network').condition(type: 'Failing')['status'] == "False" + And the expression should be true> cluster_operator('network').condition(type: 'Degraded')['status'] == "False" And the expression should be true> cluster_operator('network').condition(type: 'Progressing')['status'] == "False" @@ -72,8 +75,8 @@ Feature: Operator related networking scenarios @destructive Scenario: The clusteroperator should be able to reflect the realtime status of the network when the config has problem Given the master version >= "4.0" - # Check that the operator is not failing - Given the expression should be true> cluster_operator('network').condition(type: 'Failing')['status'] == "False" + # Check that the operator is not Degraded + Given the expression should be true> cluster_operator('network').condition(type: 'Degraded')['status'] == "False" # Copy the value of the networktype for backup When I run the :get admin command with: | resource | network.config.openshift.io | @@ -100,7 +103,7 @@ Feature: Operator related networking scenarios # Check that the operator status reflect the problem Given I wait up to 10 seconds for the steps to pass: """ - Given the status of condition "Failing" for network operator is :True + Given the status of condition "Degraded" for network operator is :True And the status of condition "Available" for network operator is :True """ # Change the network.config.openshift.io back @@ -113,7 +116,7 @@ Feature: Operator related networking scenarios # Check that the operator status Given I wait up to 20 seconds for the steps to pass: """ - Given the status of condition "Failing" for network operator is :False + Given the status of condition "Degraded" for network operator is :False And the status of condition "Available" for network operator is :True """ diff --git a/features/step_definitions/networking.rb b/features/step_definitions/networking.rb index cf81c51cee..d954c4d289 100644 --- a/features/step_definitions/networking.rb +++ b/features/step_definitions/networking.rb @@ -652,8 +652,8 @@ elsif type == "Progressing" @result = admin.cli_exec(:get, resource: "clusteroperators", resource_name: "network", o: "jsonpath={.status.conditions[?(.type == \"Progressing\")].status}") real_status = @result[:response] - elsif type == "Failing" - @result = admin.cli_exec(:get, resource: "clusteroperators", resource_name: "network", o: "jsonpath={.status.conditions[?(.type == \"Failing\")].status}") + elsif type == "Degraded" + @result = admin.cli_exec(:get, resource: "clusteroperators", resource_name: "network", o: "jsonpath={.status.conditions[?(.type == \"Degraded\")].status}") real_status = @result[:response] else raise "Unknown condition type!"