From e2b78b4a41880a79b805c722a520cfb4a6bd3e50 Mon Sep 17 00:00:00 2001 From: StormLiangMS <89824293+StormLiangMS@users.noreply.github.com> Date: Wed, 13 Mar 2024 08:43:07 +0800 Subject: [PATCH] Revert "Fix sonic string in osversion/build (#190)" This reverts commit ec3f56d6cebdc32de9bfb9b25b5a7732414649df. --- 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 73b5aac8..7d67bf03 100644 --- a/gnmi_server/server_test.go +++ b/gnmi_server/server_test.go @@ -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 @@ -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), } diff --git a/sonic_data_client/non_db_client.go b/sonic_data_client/non_db_client.go index 0adcdd3a..12dba1ab 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 } })