Commit Graph

12 Commits

Author SHA1 Message Date
Hyeongju Johannes Lee
bec3dd0148 e2e: remove duplicate code of testing with operator
move duplicate code for testing plugins using operator to
operator module

replace the code for deploying operator webhook in operator module
with the code using utils.Kubectl to make simple for undeploying

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-07-25 17:45:30 +03:00
Mikko Ylinen
e428cd6c19 go.mod: update to k8s 1.27.1 and controller runtime 0.15.x
k8s 1.27.x triggers build errors on controller-runtime 0.14.x
so we will need to update to 0.15.x at the same time.

Changes include:

* k8s e2e framework moved to use Ginkgo context so we add
  test context to all our test nodes.
* adapt Ginkgo parameter modifications.
* adapt SGX admissionwebhook to InjectDecoder removal.
* adapt deviceplugins and FPGA CRDs to controller-runtime
  API changes.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-05-09 14:49:24 +03:00
Hyeongju Johannes Lee
e3e6e215b7 e2e: fix AfterEach to be in the correct location
'AfterEach' was made to prevent the failure of a plugin pod that
occurs due to 'BeforeEach' that deploys a plugin pod. If it is
inside a 'Context' it will still occur the same problem. Since
current e2e tests have one 'Context' in general, problems were not
visible, but it still have problem in logic and would cause the
same problems if more 'Contexts' are made. So, this commit fixes
'AfterEach' to be in the correct location.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-04-24 04:08:44 -07:00
Hyeongju Johannes Lee
f51382b517 e2e: ensure device plugin gets deleted before next one is deployed
Though namespace is deleted after each It(), it does not ensure
that it is deleted. Because of this reason, device plugin did not
get deleted before the next one is deployed. This can cause a
temporary crash of the new plugin and sometimes becomes the cause
of e2e test's failure. This commit fixes it by ensuring previous
device plugin gets deleted after each run.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-03-29 01:45:46 -07:00
Hyeongju Johannes Lee
fc0d0b5e0c
e2e, dsa: divide single It() to have multiple layers
Structure is as follows:
Describe("DSA plugin")
  Describe("without using operator")
    BeforeEach("deploys plugin")
      Context("When device resources are available")
        BeforeEach("checks if resources are available")
          It("runs a pod requesting resources")
  Describe("with using operator")
    It("deploys with operator")

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-02-16 13:35:13 +02:00
Hyeongju Johannes Lee
838bc39bc7
e2e: fix typos and minor grammar issues
finnish -> finish
check -> check if

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-12-13 11:23:21 +02:00
Mikko Ylinen
34d930a567 upgrade to k8s 1.26.0-rc.1 and controller-runtime@master
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-12-07 15:04:33 +02:00
Oleg Zhurakivskyy
ef7954c8e1 operator: Add e2e tests for DSA, IAA
Closes #1230

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2022-11-17 17:47:21 +02:00
Hyeongju Johannes Lee
3c8fe3adfa e2e: add securityContext check to see if rootfs is read-only
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-10-13 15:39:59 +03:00
Tuomas Katila
2fb11eccba e2e: Remove unnecessary namespace arguments from KubectlOrDie calls
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2022-08-31 17:09:47 +03:00
Mikko Ylinen
50b985dde5 bump go mod version to 1.18 and move to k8s.io v1.25.0-rc.0
the e2e framework in v1.25 also reguires us to move to gingko/v2
so make that change too.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-08-15 13:54:02 +03:00
Oleg Zhurakivskyy
710aaaee23 dsa: Add e2e tests
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2022-06-01 11:25:12 +03:00