From 0dc19dd5c232fbe9552a2b0d846e048274d73a74 Mon Sep 17 00:00:00 2001 From: Eugene Burkov Date: Mon, 7 Dec 2020 17:26:18 +0300 Subject: [PATCH] sysutil: fix linux tests --- internal/sysutil/net_linux_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/sysutil/net_linux_test.go b/internal/sysutil/net_linux_test.go index 68ca5ba71e5..3784015aa7a 100644 --- a/internal/sysutil/net_linux_test.go +++ b/internal/sysutil/net_linux_test.go @@ -84,18 +84,18 @@ func TestIfacesStaticConfig(t *testing.T) { } func TestSetStaticIPdhcpcdConf(t *testing.T) { - dhcpcdConf := `interface wlan0` + nl + + dhcpcdConf := nl + `interface wlan0` + nl + `static ip_address=192.168.0.2/24` + nl + `static routers=192.168.0.1` + nl + - `static domain_name_servers=192.168.0.2` + nl + `static domain_name_servers=192.168.0.2` + nl + nl s := updateStaticIPdhcpcdConf("wlan0", "192.168.0.2/24", "192.168.0.1", "192.168.0.2") assert.Equal(t, dhcpcdConf, s) // without gateway - dhcpcdConf = `interface wlan0` + nl + + dhcpcdConf = nl + `interface wlan0` + nl + `static ip_address=192.168.0.2/24` + nl + - `static domain_name_servers=192.168.0.2` + nl + `static domain_name_servers=192.168.0.2` + nl + nl s = updateStaticIPdhcpcdConf("wlan0", "192.168.0.2/24", "", "192.168.0.2") assert.Equal(t, dhcpcdConf, s)