*: tests mustn't leave repo dirty

This commit is contained in:
Andrey Meshkov 2019-10-02 16:59:34 +03:00
parent 33ae359cc1
commit ed0c5ee525
1 changed files with 4 additions and 0 deletions

View File

@ -1,10 +1,14 @@
package home package home
import ( import (
"os"
"testing" "testing"
) )
func TestResolveRDNS(t *testing.T) { func TestResolveRDNS(t *testing.T) {
_ = os.RemoveAll(config.getDataDir())
defer func() { _ = os.RemoveAll(config.getDataDir()) }()
config.DNS.BindHost = "1.1.1.1" config.DNS.BindHost = "1.1.1.1"
initDNSServer() initDNSServer()
if r := config.dnsctx.rdns.resolve("1.1.1.1"); r != "one.one.one.one" { if r := config.dnsctx.rdns.resolve("1.1.1.1"); r != "one.one.one.one" {