Skip to content

Commit

Permalink
Fix sonic string in osversion/build (sonic-net#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbud-msft authored and mssonicbld committed Mar 4, 2024
1 parent 50849ce commit ec3f56d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gnmi_server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ func runGnmiTestGet(t *testing.T, namespace string) {
// Happy path
createBuildVersionTestCase(
"get osversion/build", // query path
`{"build_version": "sonic.12345678.90", "error":""}`, // expected response
`{"build_version": "SONiC.12345678.90", "error":""}`, // expected response
"build_version: '12345678.90'\ndebian_version: '9.13'", // YAML file content
nil), // mock file reading error

Expand All @@ -1306,7 +1306,7 @@ func runGnmiTestGet(t *testing.T, namespace string) {
// Happy path with different value
createBuildVersionTestCase(
"get osversion/build different value",
`{"build_version": "sonic.23456789.01", "error":""}`,
`{"build_version": "SONiC.23456789.01", "error":""}`,
"build_version: '23456789.01'\ndebian_version: '9.15'",
nil),
}
Expand Down
2 changes: 1 addition & 1 deletion sonic_data_client/non_db_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func getBuildVersion() ([]byte, error) {

// Prepend 'sonic.' to the build version string.
if versionFileStash.versionInfo.BuildVersion != "sonic.NA" {
versionFileStash.versionInfo.BuildVersion = "sonic." + versionFileStash.versionInfo.BuildVersion
versionFileStash.versionInfo.BuildVersion = "SONiC." + versionFileStash.versionInfo.BuildVersion
}
})

Expand Down

0 comments on commit ec3f56d

Please sign in to comment.