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

fix the format of output for OCP-13022 #3730

Merged
merged 6 commits into from
Jan 21, 2025
Merged
Changes from 5 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
17 changes: 9 additions & 8 deletions features/upgrade/node/node-upgrade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Feature: Node components upgrade tests
When I run commands on the host:
| cat /etc/kubernetes/kubelet.conf |
Then the step should succeed
And the output should contain:
| "imageMinimumGCAge": "5m0s" |
| "imageGCHighThresholdPercent": 80 |
| "maxPods": 240 |
And the output should match:
| [\"]?imageMinimumGCAge[\"]?: [\"]?5m0s[\"]? |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[\"]? can be shorten as "?

Copy link
Contributor Author

@lyman9966 lyman9966 Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ["]? is more accurate than ? , means only allow appearing " but no other character

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I posted it as "?, not ?

| [\"]?imageGCHighThresholdPercent[\"]?: 80 |
| [\"]?maxPods[\"]?: 240 |

# @author [email protected]
# @case_id OCP-13022
Expand Down Expand Up @@ -76,7 +76,8 @@ Feature: Node components upgrade tests
When I run commands on the host:
| cat /etc/kubernetes/kubelet.conf |
Then the step should succeed
And the output should contain:
| "imageMinimumGCAge": "5m0s" |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of hard code to json/yaml format, we can use the output should match, then we can regexp in the outputs.

| "imageGCHighThresholdPercent": 80 |
| "maxPods": 240 |
And the output should match:
| [\"]?imageMinimumGCAge[\"]?: [\"]?5m0s[\"]? |
| [\"]?imageGCHighThresholdPercent[\"]?: 80 |
| [\"]?maxPods[\"]?: 240 |