From d59e436de44a6aae156b1889d5a398e497be39a4 Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:17:03 -0800 Subject: [PATCH] Fix sonic string in osversion/build (#190) --- gnmi_server/server_test.go | 4 ++-- sonic_data_client/non_db_client.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gnmi_server/server_test.go b/gnmi_server/server_test.go index 9df8bc72..d7d6cac3 100644 --- a/gnmi_server/server_test.go +++ b/gnmi_server/server_test.go @@ -1401,7 +1401,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 @@ -1422,7 +1422,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), } diff --git a/sonic_data_client/non_db_client.go b/sonic_data_client/non_db_client.go index 54324065..a1c4a6c5 100644 --- a/sonic_data_client/non_db_client.go +++ b/sonic_data_client/non_db_client.go @@ -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 } })