mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-14 20:56:42 +00:00
Merge pull request #324 from marquiz/devel/e2e-test
Small improvements in e2e tests
This commit is contained in:
commit
26c3cf9e4e
1 changed files with 4 additions and 4 deletions
|
@ -318,7 +318,6 @@ func nfdWorkerPodSpec(image string, extraArgs []string) v1.PodSpec {
|
|||
},
|
||||
},
|
||||
ServiceAccountName: "nfd-master-e2e",
|
||||
HostNetwork: true,
|
||||
DNSPolicy: v1.DNSClusterFirstWithHostNet,
|
||||
Volumes: []v1.Volume{
|
||||
{
|
||||
|
@ -429,7 +428,7 @@ var _ = framework.KubeDescribe("Node Feature Discovery", func() {
|
|||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
|
||||
ginkgo.By("Waiting for the nfd-master pod to be running")
|
||||
gomega.Expect(e2epod.WaitForPodRunningInNamespace(f.ClientSet, masterPod)).NotTo(gomega.HaveOccurred())
|
||||
gomega.Expect(e2epod.WaitTimeoutForPodRunningInNamespace(f.ClientSet, masterPod.Name, masterPod.Namespace, time.Minute)).NotTo(gomega.HaveOccurred())
|
||||
|
||||
ginkgo.By("Waiting for the nfd-master service to be up")
|
||||
gomega.Expect(framework.WaitForService(f.ClientSet, f.Namespace.Name, nfdSvc.ObjectMeta.Name, true, time.Second, 10*time.Second)).NotTo(gomega.HaveOccurred())
|
||||
|
@ -494,7 +493,7 @@ var _ = framework.KubeDescribe("Node Feature Discovery", func() {
|
|||
// More comprehensive test when --e2e-node-config is enabled
|
||||
//
|
||||
ginkgo.Context("and nfd-workers as a daemonset with default sources enabled", func() {
|
||||
ginkgo.It("the node labels listed in the e2e config should be present", func() {
|
||||
ginkgo.It("the node labels and annotations listed in the e2e config should be present", func() {
|
||||
readConfig()
|
||||
if conf == nil {
|
||||
ginkgo.Skip("no e2e-config was specified")
|
||||
|
@ -524,10 +523,10 @@ var _ = framework.KubeDescribe("Node Feature Discovery", func() {
|
|||
e2elog.Logf("node %q missing from e2e-config, skipping...", node.Name)
|
||||
continue
|
||||
}
|
||||
e2elog.Logf("verifying node %q...", node.Name)
|
||||
nodeConf := fConf.Nodes[node.Name]
|
||||
|
||||
// Check labels
|
||||
e2elog.Logf("verifying labels of node %q...", node.Name)
|
||||
for k, v := range nodeConf.ExpectedLabelValues {
|
||||
gomega.Expect(node.Labels).To(gomega.HaveKeyWithValue(k, v))
|
||||
}
|
||||
|
@ -548,6 +547,7 @@ var _ = framework.KubeDescribe("Node Feature Discovery", func() {
|
|||
}
|
||||
|
||||
// Check annotations
|
||||
e2elog.Logf("verifying annotations of node %q...", node.Name)
|
||||
for k, v := range nodeConf.ExpectedAnnotationValues {
|
||||
gomega.Expect(node.Annotations).To(gomega.HaveKeyWithValue(k, v))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue