Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SaveOnSet #108

Merged
merged 29 commits into from
May 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
53fca81
Add SaveOnSet
rlucus May 4, 2023
63d1461
Add SaveOnSet
rlucus May 4, 2023
e28fd28
Merge branch 'master' into master
rlucus Oct 30, 2023
add7f88
use trans_util for save on set
rlucus Oct 30, 2023
7f7fb7c
use trans_util for save on set
rlucus Oct 30, 2023
3feafb0
use trans_util for save on set
rlucus Oct 30, 2023
561fccb
use trans_util for save on set
rlucus Oct 30, 2023
39dd1d5
use trans_util for save on set
rlucus Oct 30, 2023
bd0fd0b
use trans_util for save on set
rlucus Oct 30, 2023
d14cc0d
change save-on-set to sonic-services-client
rlucus Mar 27, 2024
0ef3e3b
Merge branch 'master' into master
rlucus Mar 27, 2024
ba53d89
change save-on-set to sonic-services-client
rlucus Mar 27, 2024
4d9c147
Update telemetry.go formating
rlucus Mar 27, 2024
2ac1886
Merge branch 'master' into master
rlucus Apr 12, 2024
9d4d843
Merge branch 'master' into master
rlucus Apr 23, 2024
8daa3cf
Merge branch 'master' into master
rlucus Apr 23, 2024
77edc8e
fix merge
rlucus Apr 24, 2024
c6d234a
add coverage
rlucus Apr 24, 2024
d925cea
Merge branch 'master' into master
rlucus Apr 24, 2024
cb77023
add coverage
rlucus Apr 24, 2024
98040c4
checking test
rlucus Apr 25, 2024
427c6f9
mistake
rlucus Apr 25, 2024
b08ce09
re-enable unit test
rlucus May 7, 2024
be4e02f
Merge branch 'master' into master
rlucus May 7, 2024
4b4a0f6
Merge branch 'master' into master
rlucus May 7, 2024
9e1ac63
Merge branch 'master' into master
rlucus May 7, 2024
e7aae6e
Merge branch 'master' into master
rlucus May 13, 2024
f3e3c35
Merge branch 'master' into master
sneelam20 May 17, 2024
d8aa6b6
Merge branch 'master' into master
sneelam20 May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
checking test
rlucus committed Apr 25, 2024
commit 98040c4d0d42a3f270f44237b732c4ac44152623
44 changes: 22 additions & 22 deletions gnmi_server/server_test.go
Original file line number Diff line number Diff line change
@@ -4164,28 +4164,28 @@ func TestMasterArbitration(t *testing.T) {
})
}

func TestSaveOnSet(t *testing.T) {
// Fail client creation
fakeDBC := gomonkey.ApplyFuncReturn(ssc.NewDbusClient, nil, fmt.Errorf("Fail Create"))
if err := SaveOnSetEnabled(); err == nil {
t.Error("Expected Client Failure")
}
fakeDBC.Reset()

// Successful Dbus call
goodDbus := gomonkey.ApplyFuncReturn(ssc.DbusApi, nil)
if err := SaveOnSetEnabled(); err != nil {
t.Error("Unexpected DBUS failure")
}
goodDbus.Reset()

// Fail Dbus call
badDbus := gomonkey.ApplyFuncReturn(ssc.DbusApi, fmt.Errorf("Fail Send"))
defer badDbus.Reset()
if err := SaveOnSetEnabled(); err == nil {
t.Error("Expected DBUS failure")
}
}
// func TestSaveOnSet(t *testing.T) {
// // Fail client creation
// fakeDBC := gomonkey.ApplyFuncReturn(ssc.NewDbusClient, nil, fmt.Errorf("Fail Create"))
// if err := SaveOnSetEnabled(); err == nil {
// t.Error("Expected Client Failure")
// }
// fakeDBC.Reset()

// // Successful Dbus call
// goodDbus := gomonkey.ApplyFuncReturn(ssc.DbusApi, nil)
// if err := SaveOnSetEnabled(); err != nil {
// t.Error("Unexpected DBUS failure")
// }
// goodDbus.Reset()

// // Fail Dbus call
// badDbus := gomonkey.ApplyFuncReturn(ssc.DbusApi, fmt.Errorf("Fail Send"))
// defer badDbus.Reset()
// if err := SaveOnSetEnabled(); err == nil {
// t.Error("Expected DBUS failure")
// }
// }

func init() {
// Enable logs at UT setup