[action] [PR:14860] fix for test_snmp_numpsu failure #15254
Merged
+8
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
test_snmp_numpsu
TC fails because of change instdout
output, observed in202405
&202311
.Fixes # (issue)
stdout_lines
will be use to fetch thenumpsus
value, if thestdout_lines
is empty / the value can't be typecasted; then in all scenarios TC wouldn't break, instead it will Error out gracefully. Samplestdout_lines
considered -Type of change
Back port request
Approach
What is the motivation for this PR?
Observed
test_snmp_psu
failing in202405
&202311
images due to change in thestdout
structure.How did you do it?
Earlier
stdout
output was simply getting typecasted, instead now it will usestdout_lines
& check its length, if it has a non-zero length, then it will pick the last element & try typecasting it;numpsus
count if exists, will always be the last element in the output.How did you verify/test it?
Run changes with
202405
&202311
images on aT0
setup and all of them passed.