Pull request: all: imp some tests

Merge in DNS/adguard-home from imp-tests to master

Squashed commit of the following:

commit 6171420068d66808f069f280a81e0c60e61e5ce3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Mar 25 17:43:36 2021 +0300

    aghnet: imp test msgs

commit ed2880ff03ab0e41a77f07aad2caf13bf5f4bd9f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Mar 25 17:39:44 2021 +0300

    all: imp some tests
This commit is contained in:
Ainar Garipov
2021-03-25 18:03:29 +03:00
parent 3764c1dfe4
commit 27f4f05273
6 changed files with 42 additions and 40 deletions

View File

@@ -49,7 +49,8 @@ func TestDHCPCDStaticConfig(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
r := bytes.NewReader(tc.data)
has, err := dhcpcdStaticConfig(r, "wlan0")
require.Nil(t, err)
require.NoError(t, err)
assert.Equal(t, tc.want, has)
})
}
@@ -86,7 +87,8 @@ func TestIfacesStaticConfig(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
r := bytes.NewReader(tc.data)
has, err := ifacesStaticConfig(r, "enp0s3")
require.Nil(t, err)
require.NoError(t, err)
assert.Equal(t, tc.want, has)
})
}