Skip to content

Commit 2ef668c

Browse files
Add TestDelete to settings_test.go
1 parent 85956f0 commit 2ef668c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

commands/daemon/settings_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,18 @@ func TestWrite(t *testing.T) {
157157
// We don't verify the content since we expect config library, Viper, to work
158158
require.True(t, configFile.Exist())
159159
}
160+
161+
func TestDelete(t *testing.T) {
162+
_, err := svc.Delete(context.Background(), &rpc.DeleteRequest{
163+
Key: "doesnotexist",
164+
})
165+
require.Error(t, err)
166+
167+
_, err = svc.Delete(context.Background(), &rpc.DeleteRequest{
168+
Key: "network",
169+
})
170+
require.NoError(t, err)
171+
172+
_, err = svc.GetValue(context.Background(), &rpc.GetValueRequest{Key: "network"})
173+
require.Error(t, err)
174+
}

commands/daemon/testdata/arduino-cli.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ logging:
1414
file: ""
1515
format: text
1616
level: info
17+
18+
network:
19+
proxy: "123"

0 commit comments

Comments
 (0)