Skip to content

Commit

Permalink
better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelvillard committed Feb 8, 2023
1 parent b8c2617 commit fc683ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/syncer/dns/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestDNSResolution(t *testing.T) {
framework.Eventually(t, checkLogs(ctx, t, downstreamKubeClient, downstreamWS2NS1, "ping-fully-qualified-fail", "ping: bad"),
wait.ForeverTestTimeout, time.Millisecond*500, "Service name was resolved")

t.Log("Change ping-fully-qualified deployment DNS config to use workspace 2 nameserver")
t.Log("Change ping-fully-qualified deployment DNS config to use workspace 2 nameserver and check the DNS name does not resolve")
dnsServices, err := downstreamKubeClient.CoreV1().Services(syncer.SyncerID).List(ctx, metav1.ListOptions{})
require.NoError(t, err)
require.True(t, len(dnsServices.Items) >= 2)
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestDNSResolution(t *testing.T) {
require.NoError(t, err)

framework.Eventually(t, checkLogs(ctx, t, downstreamKubeClient, downstreamWS1NS1, "ping-fully-qualified", "ping: bad"),
wait.ForeverTestTimeout, time.Millisecond*500, "Service name was still not resolved")
wait.ForeverTestTimeout, time.Millisecond*500, "Service name was resolved")
}

func checkLogs(ctx context.Context, t *testing.T, downstreamKubeClient *kubernetes.Clientset, downstreamNamespace, containerName, expectedPrefix string) func() (success bool, reason string) {
Expand Down

0 comments on commit fc683ba

Please sign in to comment.