-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[e2e] adding a period to the tested fqdn and improve error readability #44
Conversation
Skipping CI for Draft Pull Request. |
/test pull-kubesecondarydns-e2e-k8s |
/test pull-kubesecondarydns-e2e-k8s |
/test pull-kubesecondarydns-e2e-k8s |
/test pull-kubesecondarydns-e2e-k8s |
The `ShouldNot` description is interpeted before the `Eventually` code is invoked. Therefore, the `nslookupOutput` will never be presented in this description. Changed the `Eventually`to return a more detailed error that contains also the nslookup command output. Signed-off-by: Alona Paz <alkaplan@redhat.com>
According to the nslokkup man page - "If the lookup request contains at least one period but doesn't end with a trailing period, append the domain names in the domain search list to the request until an answer is received." To avoid this, a period is added to our fqdn. Signed-off-by: Alona Paz <alkaplan@redhat.com>
@@ -88,7 +88,7 @@ var _ = Describe("Virtual Machines Startup", func() { | |||
var nslookupOutput []byte | |||
Eventually(func() error { | |||
var nslookupErr error | |||
nslookupOutput, nslookupErr = exec.Command("nslookup", fmt.Sprintf("-port=%s", dnsPort), fmt.Sprintf("%s.%s.%s.%s", interfaceName, vmiName, testNamespace, domain), dnsIP).CombinedOutput() | |||
nslookupOutput, nslookupErr = exec.Command("nslookup", fmt.Sprintf("-port=%s", dnsPort), fmt.Sprintf("%s.%s.%s.%s.", interfaceName, vmiName, testNamespace, domain), dnsIP).CombinedOutput() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider using nosearch instead adding a dot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use dot for the same purpose in the zone file as well. I prefer to stick to this standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to consider later - maybe use vm.io
instead vm
, where there isn't a DOMAIN ?
(if its even allowed basically, and if it fixes the problem as well as the secondary.io
did on CI without adding a dot)
You might want to add please what happened on CI when there was no dot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlonaKaplan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
The PR contains two commits.
The first one is adding a period to the tested fqdn.
According to the nslokkup man page -
The second one returns readable
nslookup
error.Special notes for your reviewer:
Release note: