aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2021-07-29 11:31:31 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-08-02 13:54:04 +0200
commit2dbc41a19b6e5c6919fefbdab4ff35ca77109180 (patch)
treec8b54b742f6119e2d66b105c3de3c5d7dc590468
parentdocs: add reg command shortcut to admin keys (diff)
downloadwireguard-windows-2dbc41a19b6e5c6919fefbdab4ff35ca77109180.tar.xz
wireguard-windows-2dbc41a19b6e5c6919fefbdab4ff35ca77109180.zip
conf: update storage test to follow changes in code
Signed-off-by: Simon Rozman <simon@rozman.si>
-rw-r--r--conf/store_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/conf/store_test.go b/conf/store_test.go
index 3cec0035..304a11e7 100644
--- a/conf/store_test.go
+++ b/conf/store_test.go
@@ -17,7 +17,7 @@ func TestStorage(t *testing.T) {
return
}
- err = c.Save()
+ err = c.Save(true)
if err != nil {
t.Errorf("Unable to save config: %s", err.Error())
}
@@ -54,7 +54,11 @@ func TestStorage(t *testing.T) {
}
c.Interface.PrivateKey = *k
- err = c.Save()
+ err = c.Save(false)
+ if err == nil {
+ t.Error("Config disappeared or was unexpectedly overwritten")
+ }
+ err = c.Save(true)
if err != nil {
t.Errorf("Unable to save config a second time: %s", err.Error())
}