Skip to content

Commit

Permalink
Fix test_telemetry:test_osbuild_version to use correct SONiC string i…
Browse files Browse the repository at this point in the history
…n OS version (#11958)

What is the motivation for this PR?
Need to make corresponding change done in sonic-net/sonic-gnmi#190 to sonic-mgmt test case

How did you do it?
Fix expected sonic string in test case

How did you verify/test it?
Pipeline
  • Loading branch information
zbud-msft authored Mar 18, 2024
1 parent 50f59b1 commit a3ba261
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,12 @@ telemetry/test_telemetry.py:
conditions:
- "(is_multi_asic==True) and (release in ['201811', '201911'])"

telemetry/test_telemetry.py::test_osbuild_version:
skip:
reason: "Testcase ignored due to Github issue: https://github.com/sonic-net/sonic-mgmt/issues/12021"
conditions:
- https://github.com/sonic-net/sonic-mgmt/issues/12021

#######################################
##### pktgen #####
#######################################
Expand Down
4 changes: 2 additions & 2 deletions tests/telemetry/test_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def test_osbuild_version(duthosts, enum_rand_one_per_hwsku_hostname, ptfhost, lo
show_gnmi_out = ptfhost.shell(cmd)['stdout']
result = str(show_gnmi_out)

assert_equal(len(re.findall(r'"build_version": "sonic\.', result)),
assert_equal(len(re.findall(r'"build_version": "SONiC\.', result)),
1, "build_version value at {0}".format(result))
assert_equal(len(re.findall(r'sonic\.NA', result, flags=re.IGNORECASE)),
assert_equal(len(re.findall(r'SONiC\.NA', result, flags=re.IGNORECASE)),
0, "invalid build_version value at {0}".format(result))


Expand Down

0 comments on commit a3ba261

Please sign in to comment.