mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
daemon/ui tests updated
This commit is contained in:
parent
6622df9d38
commit
5fa561607f
2 changed files with 8 additions and 3 deletions
|
@ -22,6 +22,9 @@ var (
|
|||
DefaultDuration: "once",
|
||||
InterceptUnknown: false,
|
||||
Firewall: "nftables",
|
||||
Rules: config.RulesOptions{
|
||||
Path: "/etc/opensnitchd/rules",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -75,6 +78,7 @@ func TestClientConfigReloading(t *testing.T) {
|
|||
reloadConfig.DefaultAction = string(rule.Deny)
|
||||
reloadConfig.InterceptUnknown = true
|
||||
reloadConfig.Firewall = iptables.Name
|
||||
reloadConfig.FwOptions.QueueBypass = true
|
||||
reloadConfig.Server.Address = "unix:///run/user/1000/opensnitch/osui.sock"
|
||||
|
||||
plainJSON, err := json.Marshal(reloadConfig)
|
||||
|
@ -84,7 +88,8 @@ func TestClientConfigReloading(t *testing.T) {
|
|||
if err = config.Save(configFile, string(plainJSON)); err != nil {
|
||||
t.Errorf("error saving config to disk: %s", err)
|
||||
}
|
||||
time.Sleep(time.Second * 3)
|
||||
// wait for the config to load
|
||||
time.Sleep(time.Second * 10)
|
||||
|
||||
validateConfig(t, uiClient, &reloadConfig)
|
||||
})
|
||||
|
|
4
daemon/ui/testdata/default-config.json.orig
vendored
4
daemon/ui/testdata/default-config.json.orig
vendored
|
@ -26,10 +26,10 @@
|
|||
"FwOptions": {
|
||||
"ConfigPath": "/etc/opensnitchd/system-fw.json",
|
||||
"MonitorInterval": "25s",
|
||||
"ActionOnOverflow": "drop"
|
||||
"QueueBypass": false
|
||||
},
|
||||
"Rules": {
|
||||
"Path": "",
|
||||
"Path": "/etc/opensnitchd/rules",
|
||||
"EnableChecksums": true
|
||||
},
|
||||
"Ebpf": {
|
||||
|
|
Loading…
Add table
Reference in a new issue