-
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, Introduce e2e test: resolving a FQDN entry #38
Conversation
Skipping CI for Draft Pull Request. |
Signed-off-by: Alona Paz <alkaplan@redhat.com>
Currently one node is enough for us. The cluster has forwarding from 127.0.0.1:31111 to the node01. By having only one node we make sure the dns query is forwarding to the correct node. Signed-off-by: Alona Paz <alkaplan@redhat.com>
Those are needed for the e2e test wihich creates a VM with multus interface. Signed-off-by: Alona Paz <alkaplan@redhat.com>
About nslookup binary
So on both local and on CI, it will directly fail as first step if the binary doesn't exists |
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.
Nice thanks
First pass
Please update PR desc to
e2e, Introduce e2e test: resolving a FQDN entry
or something like that
typo on the last line of the PR desc (file name missing dot)
hack/functest.sh
Outdated
@@ -1,3 +1,8 @@ | |||
#!/bin/bash -e | |||
#!/usr/bin/env bash |
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 keep the previous shebang, this is the one we use all over
plus remove plesase the set -xe
tests/vm_startup_test.go
Outdated
const pollingInterval = 5 * time.Second | ||
const testNamespace = "secondary-test" | ||
const dnsPort = "31111" | ||
const dnsIP = "127.0.0.1" // Forwarded to the node port - https://github.com/kubevirt/kubevirtci/pull/867 ,https://github.com/kubevirt/kubesecondarydns/pull/23 |
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.
I dont think we need the comments
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.
There is no chance that external contributor or even future us will understand why "127.0.0.1" is the dnsIP without thos comment.
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.
so maybe just something generic as this is the flow of kubevirtci ?
or even just the 2nd PR can be enough ?
two PRs is way too much imo
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.
I think those two PR explain the best how we rich the dns. I prefer to have it and to same future developer some time in the future.
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.
I am personally against too much comments / links
if we can find something in between it would be great please
btw the first link has info about the node port as well
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.
note that even now the PRs are outdated, because the was another PR which change kuevirtci default host port from 53 to 31111
this is the problem with comments
I think we can mention here the README.md, that once the PR of readme is merged, it explains a bit about the topology we are using on kubevirtci / nodeport
Config: `{ | ||
"cniVersion": "0.3.1", | ||
"name": "mynet", | ||
"plugins": [ | ||
{ | ||
"type": "ptp", | ||
"ipam": { | ||
"type": "static", | ||
"addresses": [ | ||
{ | ||
"address": "10.10.0.5/24", | ||
"gateway": "10.10.0.254" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}`, |
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.
maybe lets do it go style?
unless it required lots of packages
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.
what do you mean by go style?
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.
a go struct that is filled with values
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.
the config is a sting.
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.
Right maybe better to declare it as a string on top and use it ? (like kubevirt's newNetworkAttachmentDefinition
)
btw alternative indentations if you prefer
This one is what user-guide of kubevirt use
config: '{
"cniVersion": "0.3.1",
"name": "mynet",
"plugins": [
{
"type": "ptp",
"ipam": {
"type": "static",
"addresses": [
{
"address": "10.10.0.5/24",
"gateway": "10.10.0.254"
}
]
}
}
]
}'
This one is what yq pretty prints
(on kubevirt we also have one liners like this)
'{ "cniVersion": "0.3.1", "name": "mynet", "plugins": [ { "type": "ptp", "ipam": { "type": "static", "addresses": [ { "address": "10.10.0.5/24", "gateway": "10.10.0.254" } ] } } ] }'
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.
I find the one liner less readable.
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.
what about the fixed ident ?
const testNamespace = "secondary-test" | ||
const dnsPort = "31111" | ||
const dnsIP = "127.0.0.1" // Forwarded to the node port - https://github.com/kubevirt/kubevirtci/pull/867 ,https://github.com/kubevirt/kubesecondarydns/pull/23 | ||
const domain = "vm.secondary.io" |
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 #36
and then it should be just "vm"
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.
Well, it's not merged yet so I cannot consider it:) #36 will have to fix the e2e if the e2e will be merged first.
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.
can you review it please and lets merge it ? it is an easy one and lgtmed
hack/functest.sh
Outdated
source ./cluster/cluster.sh | ||
|
||
export KUBEVIRT_CLIENT_GO_SCHEME_REGISTRATION_VERSION=v1 | ||
KUBECONFIG=${KUBECONFIG:-$(cluster::kubeconfig)} $GO test -test.timeout=1h -race -test.v ./tests/... $E2E_TEST_ARGS -ginkgo.v |
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 have twice -v
, lets remove the deprecated one
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.
which one of the is deprecated?
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.
I think the ginkgo one
best to try please the different ways
tests/vm_startup_test.go
Outdated
BeforeEach(func() { | ||
By("Creating test namespace") | ||
ns := k8sv1.Namespace{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: testNamespace, | ||
}, | ||
} | ||
err := getClient().Create(context.Background(), &ns) | ||
Expect(err).ToNot(HaveOccurred(), "couldn't create namespace for the test") | ||
}) |
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.
Can be done as BeforeAll / BeforeSuite with a defer to cleanup it instead of the AfterEach
On the other hand, it guarantee the leftovers are cleaned if any, but implicit
we usually don't delete the NS after each test
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.
Since we have only one test, and in the future will maybe have few test. I find this approach cleaner and safer.
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.
It is an overkill imo, anyhow we can refactor it later, but imo we should
tests/vm_startup_test.go
Outdated
Expect(err).ToNot(HaveOccurred(), "Should successfully create the NAD") | ||
|
||
By("Creating a VirtualMachineInstance") | ||
interfaceName := "nic1" |
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 use a const for it
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.
done
interfaces := []v1.Interface{{Name: interfaceName, InterfaceBindingMethod: v1.InterfaceBindingMethod{Bridge: &v1.InterfaceBridge{}}}} | ||
networks := []v1.Network{ | ||
{Name: interfaceName, NetworkSource: v1.NetworkSource{ | ||
Multus: &v1.MultusNetwork{NetworkName: "ptp-conf"}, |
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 use a const for it
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.
why? It is never reused.
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.
it is nicer to have a const even for one time variable which declares a global name
Multus: &v1.MultusNetwork{NetworkName: "ptp-conf"}, | ||
}}, | ||
} | ||
vmi := CreateVmiObject("vmi-sec", testNamespace, interfaces, networks) |
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 use a const for it
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.
why? It is never reused.
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.
it is nicer to have a const even for one time variable which declares a global name
We need to remove push or pull_request from the git actions |
tests/vm_generator.go
Outdated
Domain: v1.DomainSpec{ | ||
Resources: v1.ResourceRequirements{ | ||
Requests: k8sv1.ResourceList{ | ||
k8sv1.ResourceMemory: resource.MustParse("64M"), |
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 use 128Mi
64M is not enough
see please kubevirt/kubevirt#5039
especially cirros-dev/cirros#52 (comment)
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.
done
hack/functest.sh
Outdated
source ./cluster/cluster.sh | ||
|
||
export KUBEVIRT_CLIENT_GO_SCHEME_REGISTRATION_VERSION=v1 | ||
KUBECONFIG=${KUBECONFIG:-$(cluster::kubeconfig)} $GO test -test.timeout=1h -race -test.v ./tests/... $E2E_TEST_ARGS -ginkgo.v |
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 add deterministic seed of 0 (unless we do want tests to run on random order once we have more)
on kubevirt we use fixed seed
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.
Currently we have just one test, so it is not relevant.
Anyway, I think it is healthier to run the tests in a random order.
Thanks, updated the PR |
/release-note-none |
f9a6b1f
to
7b3fa53
Compare
Need to show this to Brian please I think there is a new image with extended timeout |
/test pull-kubesecondarydns-e2e-k8s i hope btw sudo is not needed, lets see |
hack/functest.sh
Outdated
echo hello world | ||
source ./cluster/cluster.sh | ||
|
||
[ "$CI" == "true" ] && dnf install bind-utils |
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.
-y
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.
do we still need pkg/controllers/controllers_suite_test.go
or it can be deleted ?
Please fork the repo for next PRs, it seems you are using the main repo branches |
exit 1 | ||
fi | ||
|
||
KUBECONFIG=${KUBECONFIG:-$(cluster::kubeconfig)} $GO test -test.timeout=1h -test.v ./tests/... -ginkgo.v |
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.
i think we need to add no-color please
else we see the control characters on the log
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.
https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubesecondarydns/38/pull-kubesecondarydns-e2e-k8s/1599451475841388544
Can you please point me what control characters do we see here?
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.
watch the raw one
https://storage.googleapis.com/kubevirt-prow/pr-logs/pull/kubevirt_kubesecondarydns/38/pull-kubesecondarydns-e2e-k8s/1599451475841388544/build-log.txt
well it will remove colors from the spyglass one (the one in the link you pasted)
IIRC this what we are doing on other repos, --no-color (but best to double check)
�[38;5;243mBegin Captured GinkgoWriter Output >>�[0m
�[1mSTEP:�[0m Creating test namespace �[38;5;243m12/04/22 17:18:33.833�[0m
�[1mSTEP:�[0m Creating a NetworkAttachmentDefinition �[38;5;243m12/04/22 17:18:34.402�[0m
�[1mSTEP:�[0m Creating a VirtualMachineInstance �[38;5;243m12/04/22 17:18:34.409�[0m
�[1mSTEP:�[0m Invoking nslookup on the VMI interface FQDN �[38;5;243m12/04/22 17:18:34.437�[0m
�[1mSTEP:�[0m Removing all Virtual Machine Instances from the namespace �[38;5;243m12/04/22 17:19:44.468�[0m
�[1mSTEP:�[0m Removing all Network AttachmentDefinitions from the namespace �[38;5;243m12/04/22 17:19:54.501�[0m
�[1mSTEP:�[0m Removing the test namespace �[38;5;243m12/04/22 17:19:54.509�[0m
�[38;5;243m<< End Captured GinkgoWriter Output�[0m
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 don't have the no-color flag in kubevirt. And I find it nice to see the colors. I prefer to keep it.
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.
automation/test.sh:ginko_params="--no-color --seed=42"
automation/repeated_test.sh: ginko_params="-no-color -succinct -slow-spec-threshold=30s -focus=${NEW_TESTS} -skip=QUARANTINE -regexScansFilePath=true"
from kubevirt
Moreover spyglass itself mark the important words like FAIL/FATAL/ERROR and so on IIRC
const testNamespace = "secondary-test" | ||
const dnsPort = "31111" | ||
const dnsIP = "127.0.0.1" // Forwarded to the node port - https://github.com/kubevirt/kubevirtci/pull/867 ,https://github.com/kubevirt/kubesecondarydns/pull/23 | ||
const domain = "vm.secondary.io" |
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.
what about reading it from the CR and building accordingly the expected string?
this way it will work for:
- empty string
- D/S that fill the cluster-name (if this what we are going to do at the end)
- non empty string
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.
I think it is an overkill for the test. If we will ever need it on d/s, then we can change it.
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.
I think that this test might even help us to test it D/S manually
but ok we can just update upon need,
what about reading it from os.getenv that allows to config it easily when running D/S ?
EDIT - better to wait indeed, because it is not the only thing that will need to be changed
i.e IP:port
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.
Let's think about it when we will get to d/s
dfb63de
to
e8429af
Compare
We need it. It is for the controller unit tests. |
Please note this test would run also as part of CNAO |
I use test namespace. It should be ok. |
Once kubevirt/project-infra#2504 is merged we can remove the dnf install line please |
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, few more small comments
about PR desc, nodes reducing - maybe worth to either explain why, or at least tell see (specific) commit for more info
tests/vm_generator.go
Outdated
Name: "cloudinitdisk", | ||
DiskDevice: v1.DiskDevice{ | ||
Disk: &v1.DiskTarget{ | ||
Bus: "virtio", |
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 virtio in couple places in the same file. worth to add const please
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.
done.
tests/vm_startup_test.go
Outdated
vmiList := &v1.VirtualMachineInstanceList{} | ||
err := getClient().List(context.Background(), vmiList, &client.ListOptions{Namespace: testNamespace}) | ||
Expect(err).ToNot(HaveOccurred()) | ||
|
||
for _, vmiObject := range vmiList.Items { | ||
err = getClient().Delete(context.Background(), &vmiObject) | ||
Expect(err).ToNot(HaveOccurred()) | ||
} |
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.
isn't there a way to just delete in one shot all vms from a given namespace using the client ?
(if so, same for nads etc)
Note that the Expect in the for means that if an error occur, it will skip the rest,
i guess it is fine for now, maybe in the future we would prefer to collect errors but continue and assert the errors at the end
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.
Since I'm removing the namespace, remvoing the nads and vmis is redudnant anyway. Removed it.
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.
Its a bit not what we are doing usually, but it does the job
fine for now, later we can update if needed
(note that it does stuff implicit)
tests/vm_startup_test.go
Outdated
err := getClient().List(context.Background(), nadList, &client.ListOptions{Namespace: testNamespace}) | ||
Expect(err).ToNot(HaveOccurred()) | ||
|
||
for _, nadObject := range nadList.Items { |
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 have just one nad, can we simplify this AfterEach please ?
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.
same
tests/vm_startup_test.go
Outdated
err := getClient().List(context.Background(), vmiList, &client.ListOptions{Namespace: testNamespace}) | ||
Expect(err).ToNot(HaveOccurred()) | ||
return len(vmiList.Items) | ||
|
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 drop this blank line
(same for line 80)
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.
same
tests/vm_startup_test.go
Outdated
vmiList := &v1.VirtualMachineInstanceList{} | ||
err := getClient().List(context.Background(), vmiList, &client.ListOptions{Namespace: testNamespace}) | ||
Expect(err).ToNot(HaveOccurred()) | ||
return len(vmiList.Items) |
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.
maybe return vmiList.Items and use BeEmpty ?
(same for the rest)
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.
it was removed
tests/vm_startup_test.go
Outdated
Eventually(func() error { | ||
return getClient().Delete(context.Background(), namespace) | ||
}, 240*time.Second, 1*time.Second).Should(SatisfyAll(HaveOccurred(), WithTransform(errors.IsNotFound, BeTrue())), fmt.Sprintf("should successfully delete namespace '%s'", testNamespace)) |
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.
Better and nicer please to delete once, and wait that get shows it is gone, as done with the rest
not delete in a loop as done now
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.
The code is more compact this way. What are the benefits of the proposed approach?
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.
It isn't correct to Delete Delete .. until gone
it is correct to Delete, Get Get until gone imo
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.
done.
By("Creating a NetworkAttachmentDefinition") | ||
err := createNetworkAttachmentDefinition(testNamespace, "ptp-conf") | ||
Expect(err).ToNot(HaveOccurred(), "Should successfully create the NAD") |
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.
can be done please as a BeforeEach of this It (in the same Context), as it is not part of the "It" but preparation,
makes the It smaller
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.
done.
tests/vm_generator.go
Outdated
func CreateVmiObject(name string, namespace string, interfaces []v1.Interface, networks []v1.Network) *v1.VirtualMachineInstance { | ||
vmi := getBaseVMI(randName(name)) | ||
vmi.Namespace = namespace | ||
addContainerDisk(&vmi.Spec, "kubevirt/cirros-container-disk-demo:latest") |
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.
do we need maybe to add quay.io ? so it won't take from docker.io which we might stop updating ?
Note that the quay.io one is very old (2 years), the new ones have tag and are pretty newer (the "latest" might be an old os version that we don't use anymore)
I am not sure about what the docker.io has
we might want to consider later to upload a specific image or select a specific tag / specific image repo (such as quay.io)
pinning is also better than using latest.
anyhow we can postpone it if desired
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.
I would add it to our local registry.
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.
Still you need to select which one - this is the important part.
and imo no need to add it to the local, as it you are fetching it anyhow
but whatever you prefer
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.
changed to quay.io/kubevirt/cirros-container-disk-demo:devel
although it doesn't really matter what image we are using. The devel one is maintained by kubevirt is should be enough for us.
hack/functest.sh
Outdated
echo hello world | ||
source ./cluster/cluster.sh | ||
|
||
[ "$CI" == "true" ] && dnf install -y bind-utils |
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 remove this line as kubevirt/project-infra#2504 is merged and includes
bind-utils
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.
done
The relevant commit message has an explanation. Do you think it is not enough? |
It is enough, but the line of the PR desc better to suggest to look on it please You might want to amend the 2nd commit by adding that the reason the NodePort doesn't work on the first node, is that in case there are more than 1 nodes, that node is not a worker and only workers are included as you found. |
|
||
const timeout = 3 * time.Minute | ||
const pollingInterval = 5 * time.Second | ||
const testNamespacePrefix = "secondary-test" |
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.
why we need this with the random suffix ?
even if we run on parallel, there will be a namespace per instance as kubevirt is doing
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.
Currently we have just one test so we can use whatever namespace.
In the future, if we have more than one test we can continue to the next test without waiting for the previous test resources to be removed.
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.
It is not a good practice imo, and i less like the way using different namespaces
I prefer that we delete VMI and not wait for them but not delete the NS as we are doing on kubevirt
note that on kubevirt there are some places where we do wait for all resources to gone
tests/vm_generator.go
Outdated
v1 "kubevirt.io/api/core/v1" | ||
) | ||
|
||
const virtio = "virtio" |
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.
nit: const VirtIO
(this is like we are doing it on kubevirt)
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.
done
tests/vm_startup_test.go
Outdated
var testNamespace string | ||
|
||
var _ = Describe("Virtual Machines Startup", func() { | ||
|
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.
nit: please drop the blank line
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.
done
Signed-off-by: Alona Paz <alkaplan@redhat.com>
Signed-off-by: Alona Paz <alkaplan@redhat.com>
The script also makes sure `nslookup` is installed. Signed-off-by: Alona Paz <alkaplan@redhat.com>
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 |
The test is creating a VMI with one multus and no default interface and verifies that
nslookup
to the interface fqdn retrieves the correct IP.The PR also contains -