1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
Commit graph

14 commits

Author SHA1 Message Date
Markus Lehtonen
331f56ecc3 test/e2e: drop hostNetwork from worker pod spec
We don't need or use that anymore.
2020-05-25 16:37:38 +03:00
Markus Lehtonen
ff2c30a63c test/e2e: slightly more informative test output 2020-05-25 16:37:27 +03:00
Markus Lehtonen
00ccbe95bb test/e2e: fail faster waiting on master pod
Reduce timeout from the default 5 minutes to one minute. Error out
faster e.g. if accidentally trying to test a non-existing image.
2020-05-25 13:16:56 +03:00
Markus Lehtonen
2f4e038f10 test/e2e: drop dot imports
Make linter happy.
2020-05-20 21:48:06 +03:00
Markus Lehtonen
73602e8f28 test/e2e: goling fixes 2020-05-20 21:48:06 +03:00
Markus Lehtonen
409dc11389 Switch to sigs.k8s.io/yaml
Replace github.com/ghodss/yaml.
2020-04-23 16:54:14 +03:00
Markus Lehtonen
3d5866a06d test/e2e: more comprehensive per-node testing
Implement an end-to-end test with all feature sources enabled. The new
test runs nfd-worker as a daemonset on all (schedulable) nodes of the
test cluster which makes it possible to cover a wide range features,
assuming the test cluster is heterogenous containing nodes with varying
system configurations.

The features available depends on the node(s) the e2e testa are run on.
Thus, some runtime parameterization of the tests is needed. The patch
adds a new command line test flag 'nfd.e2e-config' that is used to
specify the per-node feature labels and annotations that is expected to
be present in the cluster. An example configuration file is provided
with the patch. The pod spec of nfd-worker deployment is changed to
better correspond the default deployment and thus enable wider feature
discovery. This means using hostnetwork and adding mounts for /sys /boot
and /etc/os-release.

The patch changes node object management so that all nfd-related labels
are removed after each test (not just the ones the test is expected to
add). Also, all nfd-related annotations are now removed.
2020-02-28 10:37:26 +02:00
Markus Lehtonen
54eaf16871 nfd-master: export label and annotation prefixes
In order to be able to use the constants in end-to-end tests.
2020-02-27 14:21:00 +02:00
Markus Lehtonen
974310251c test/e2e: adapt new wireframe to nfd context
Adapt the end-to-end test wireframe (copied from Kubernetes in the
previous commit) to node-feature-discovery.
2020-02-05 19:35:41 +02:00
Markus Lehtonen
e263c95adc test/e2e: re-copy e2e wireframe from Kubernetes
Sync with Kubernetes. Copy a wireframe for end-to-end tests directly
from Kubernetes v1.17.2.
2020-02-05 17:12:11 +02:00
Markus Lehtonen
0911de1978 Add simple e2e test
Tests that nfd master-worker communication works and that the worker is
able to label the node with the labels from the 'fake' source.

An example of running the test suite with a custom image with user's
kubeconfig:
$ go test ./test/e2e/ -args -nfd.repo=<image-repo> -nfd.tag=<image-tag> \
            -kubeconfig=$HOME/.kube/config

Partly based on some previous work done by Balaji Subramaniam.
2019-06-25 09:50:29 +03:00
Markus Lehtonen
9065c7adbe Add empty e2e test stub
Patch the (Kubernetes) e2e wireframe introduced in the previous commit with some minor
modifications, dropping some bits in order to simplify the code.

Also adds a dummy test stub for node feature discovery.
2019-06-25 09:50:29 +03:00
Markus Lehtonen
b284b2f42b Copy e2e wireframe from Kubernetes
Copy E2E wireframe directly from Kubernetes v1.13.5.
2019-06-25 09:50:29 +03:00
Markus Lehtonen
35d26001e4 nfd-worker: extend unit test to cover 'main'
Also, adds new method WaitForReady() into NfdMaster.

In practice, this quite widely tests nfd-master, too, as the tests
create an instance of NfdMaster and verify that the communication
between master and worker works.
2019-05-06 16:26:41 +03:00