Skip to content

Commit

Permalink
netlib try
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommi2Day committed Aug 31, 2024
1 parent f8cebbe commit 4150a5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions netlib/dns_docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ func prepareNetlibDNSContainer() (container *dockertest.Resource, err error) {
ips, e := dns.Resolver.LookupHost(context.Background(), netlibTestAddr)
if e != nil || len(ips) == 0 {
err = fmt.Errorf("Could not resolve DNS for %s on %s:%d: %v", netlibTestAddr, netlibDNSServer, netlibDNSPort, e)
destroyDNSContainer(container)
container = nil
_ = os.Setenv("SKIP_DNS", "true")
return
}
fmt.Println("DNS Container is ready, host", netlibTestAddr, "resolved to", ips[0])
Expand Down
6 changes: 4 additions & 2 deletions netlib/net_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package netlib

import (
"log"
"os"
"testing"

Expand All @@ -24,9 +23,12 @@ func TestMain(m *testing.M) {
return
}
netlibDNSContainer, err = prepareNetlibDNSContainer()

if err != nil || netlibDNSContainer == nil {
log.Fatalf("prepareNetlibDNSContainer failed: %s", err)
_ = os.Setenv("SKIP_DNS", "true")
// log.Fatalf("prepareNetlibDNSContainer failed: %s", err)
}

code := m.Run()
destroyDNSContainer(netlibDNSContainer)
os.Exit(code)
Expand Down

0 comments on commit 4150a5e

Please sign in to comment.