-
-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3580 from telepresenceio/thallgren/dns-svc-as-tld
Include "svc" as a top-level domain in the DNS resolver.
- Loading branch information
Showing
4 changed files
with
52 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package integration_test | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"net" | ||
"time" | ||
|
||
"github.com/datawire/dlib/dlog" | ||
) | ||
|
||
func (s *connectedSuite) Test_SvcDomain() { | ||
c := s.Context() | ||
s.ApplyEchoService(c, "echo", 8080) | ||
defer s.DeleteSvcAndWorkload(c, "deploy", "echo") | ||
|
||
host := fmt.Sprintf("echo.%s.svc", s.AppNamespace()) | ||
s.Eventually(func() bool { | ||
c, cancel := context.WithTimeout(c, 1800*time.Millisecond) | ||
defer cancel() | ||
dlog.Info(c, "LookupHost("+host+")") | ||
_, err := net.DefaultResolver.LookupHost(c, host) | ||
return s.NoErrorf(err, "%s did not resolve", host) | ||
}, 10*time.Second, 2*time.Second) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters