Commit Graph

176 Commits

Author SHA1 Message Date
Flavio Castelli
684de167b9 e2e tests: cover WebAssembly integration
Add a e2e test that runs some demo WebAssembly applications
using the dedicated containerd shims.

Note: this is not an integration test because we need to install some
binaries (the special containerd shims) on the host.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
(cherry picked from commit f82d438f39)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-03-07 17:25:43 -08:00
Manuel Buil
5bbdc56d79 Improve tailscale e2e test
Signed-off-by: Manuel Buil <mbuil@suse.com>
2024-03-07 18:10:26 +01:00
Manuel Buil
2108ec10b5 Add an integration test for flannel-backend=none
Signed-off-by: Manuel Buil <mbuil@suse.com>
2024-03-07 18:10:17 +01:00
Derek Nola
e93ae23eda Reenable Install and Snapshotter Testing (#9601)
* Use regular ubuntu runners for install and snapshotter tests
* Workaround for vagrant box caching
* Update testing readme
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-03-05 14:59:14 -08:00
Derek Nola
d0159ecf5b Update install test OS matrix (#9480)
* Remove old cgroupsv2 test
* Consolidate install test clauses into functions
* Unpin vagrant-k3s plugin version, run latest
* Add ubuntu-2204 as install test, remove ubuntu-focal
* Update nightly install matrix
* Move to Leap 15.5
* Consolidate vagrant box caching key to improve cache hits on all VM testing

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-03-05 14:59:14 -08:00
Derek Nola
b7e5d88527 Change default number of etcd nodes in E2E splitserver test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-02-21 14:21:18 -08:00
Hussein Galal
62448e1e27 Update flannel to v0.24.0 and remove multiclustercidr flag (#9075)
* update flannel to v0.24.0

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* remove multiclustercidr flag

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2024-02-11 17:14:47 +01:00
Brad Davidson
12cf604626 Add e2e test for embedded registry mirror
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 6072476432)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-01-11 19:10:42 -08:00
Manuel Buil
bd72709bdb Fix overlapping address range
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-12-08 18:19:32 -08:00
Brad Davidson
d2d63ce330 Fix flakey dynamic-cert.json in cert rotation e2e test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-11-17 19:47:23 -08:00
Brad Davidson
7e172b2bc5 Fix etcd snapshot integration tests
Snapshot delete/prune tests were only working because the delete command
would report success even when deleting a snapshot that didn't exist,
and the test regex was finding the snapshot name multiple times in
the list output and deleting it twice.

Snapshot restore tests seem to have expected the deployment to be rolled out
immediately, which is not a reasonable expectation.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7c5b69ca1d)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 10:23:51 -07:00
Brad Davidson
26db504dd7 Move snapshot delete into local/s3 functions
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5cd4f69bfa)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 10:23:51 -07:00
Brad Davidson
bc4cbb9bfa Bump busybox to v1.36.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9bb1ce1253)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-10-13 10:23:51 -07:00
Derek Nola
8acba4a627 Server Token Rotation (#8577)
* Consolidate NewCertCommands
* Add support for user defined new token
* Add E2E testlets



* Ensure agent token also changes

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-10-10 09:45:36 -07:00
Vitor Savian
a066632d19 Added advertise address integration test
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2023-10-05 17:11:00 -03:00
Manuel Buil
8869aab229 Take IPFamily precedence based on order
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-10-02 18:40:30 +02:00
Manuel Buil
1d395f63e0 Fix spellcheck problem (boostrap ==> bootstrap)
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-09-29 16:12:46 +02:00
Vitor Savian
767c9153c1 Added cluster reset from non bootstrap nodes on snapshot restore e2e test
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2023-09-27 16:43:30 -03:00
Derek Nola
7d6751713f E2E test for token coverage (#8184)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-09-25 13:07:04 -07:00
Derek Nola
9cf4272da7 Fix for Kubeflag Integration test (#8154)
* Use argument that doesn't require file
* Use build-k3s workflow in cgroup
* Bump timeout on integration tests

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-09-25 13:07:04 -07:00
Ian Cardoso
52e2c08acc fix for etcd-snapshot delete with --etcd-s3 flag (#8110)
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308db8)
2023-08-04 19:16:27 -07:00
Derek Nola
60bd5c5b3f [Release-1.26] August Test Backports (#8126)
* Unit test for MustFindString (#8013)
* Consolidate CopyFile functions (#8079)
* Remove unnecessary E2E envs
* Cleanup unnecessary "sudo" in commands
* Add additonal s3 coverage clause

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-08-04 11:39:01 -07:00
Derek Nola
a7373f94d5 Don't use zgrep in check-config if apparmor porfile is enforced (#7956)
* Don't use zgrep if apparmor is enforced for it

* Bump e2e se timeouts for reencryption time

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-07-13 09:13:10 -07:00
Ian Cardoso
bf86306981 fix e2e startup flaky test (#7839)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit 324f9ad4da)
2023-07-07 11:14:03 -03:00
Ian Cardoso
552c008857 add e2e s3 test (#7833)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit 9e334153cf)
2023-07-07 11:14:03 -03:00
Brad Davidson
75bcc79b38 Fix test file list
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7b61aacb56)
2023-06-12 10:53:09 -07:00
Manuel Buil
5de7185d74 Remove unused libvirt config
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 18:18:40 +02:00
Manuel Buil
530178cf2d Fix spelling check
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 15:43:39 +02:00
Manuel Buil
656aab06eb Merge pull request #7727 from manuelbuil/tailscale126
[Release 1.26] VPN integration
2023-06-12 10:20:04 +02:00
Ian Cardoso
d680b45146 [Release-1.26] E2e: Private registry test (#7721)
* add private registry e2e test (#7653)

add private registry e2e test

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>

* E2E: Startup test cleanup + RunCommand Enhancement (#7388)

* Add beforesuite to startup
* Reduce timeouts for startup
* Fix cleanup + set kubeconfig

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2023-06-09 13:09:54 -07:00
Manuel Buil
ab07b36ccd VPN PoC
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-09 19:11:36 +02:00
Derek Nola
8988439e52 [Release-1.26] E2E and Dep Backports - June (#7693)
* Bump docker go.mod (#7681)
* Shortcircuit commands with version or help flags (#7683)
* Fix for longhorn integration test
* Add Rotation certification Check (#7097)
* Add Certification Test to Validate Cluster
* Fix to stop/start for k3s certificate rotation
* E2E: Use sudo for all RunCmdOnNode
* Remove unnecessary daemonset addition/deletion

Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: est-suse <esteban.esquivel@suse.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Esteban Esquivel Alvarado <esteban.alvarado@suse.com>
Co-authored-by: est-suse <esteban.esquivel@suse.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2023-06-08 15:05:30 -07:00
Manuel Buil
6ca5f342e3 Add '-all' flag to apply to inactive units
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-17 18:50:02 +02:00
Brad Davidson
9eeee04675 Fix token startup test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c98137ddca)
2023-05-10 17:37:14 -07:00
Brad Davidson
f14d33c471 Fail to validate server tokens that use bootstrap id/secret format
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit cf9ebb3259)
2023-05-10 17:37:14 -07:00
Brad Davidson
34df1c49a5 Add e2e test for --disable-agent
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1ca035accc)
2023-05-10 17:37:14 -07:00
Derek Nola
c206088d20 local-storage: Fix permission (#7217) (#7474)
* local-storage: Fix permission

/var/lib/rancher/k3s/storage/ should be 700
/var/lib/rancher/k3s/storage/* should be 777

Fixes #2348



* Fix pod command field type

* Fix to int test



---------

Signed-off-by: Boleyn Su <boleyn.su@gmail.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Boleyn Su <boleyn.su@gmail.com>
Co-authored-by: Brad Davidson <brad@oatmail.org>
2023-05-10 11:08:38 -07:00
Ian Cardoso
414cc27528 add kube-* server flags integration tests (#7416)
This commit adds SearchK3sLog function to find specific strings in integration tests log file and also removes FindStringInCmdAsync function since it was not being used.

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-05-09 16:50:14 -03:00
Brooks Newberry
21a96c64cc Add longhorn storage test (#6445)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-05-09 16:50:14 -03:00
Ian Cardoso
42fd1bf090 Add integration tests for etc-snapshot server flags and refactor /tests/integration/integration.go/K3sStartServer (#7300) (#7377)
This adds integration tests for the following flags: "--etcd-snapshot-name","--etcd-snapshot-dir","--etcd-snapshot-retention","--etcd-snapshot-schedule-cron" and "--etcd-snapshot-compress". It also refactors K3sStartServer to stop applying strings.Fields() into inputArgs, so it can accept arguments that have space in their definition.

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit 1ac03aad43)
2023-05-02 10:13:07 -03:00
fmoral2
6c394abb32 Add make commands to terraform automation and fix external dbs related issue (#7159)
* test: add make commands and dependencies

Signed-off-by: Francisco <francisco.moral@suse.com>

* fix: fix issue on logic for using external dbs and dependencies

Signed-off-by: Francisco <francisco.moral@suse.com>

---------

Signed-off-by: Francisco <francisco.moral@suse.com>
2023-04-06 12:17:13 -03:00
Derek Nola
d2e04b826a Don't apply hardened args to agent (#7089)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-04-04 09:35:28 -07:00
ShylajaDevadiga
8ec7d5e6b0 fix_get_sha_url (#7187)
Signed-off-by: ShylajaDevadiga <shylaja@rancher.com>
2023-03-31 13:26:29 -07:00
Derek Nola
9980504196 Fix to Rotate CA e2e test (#7101)
* Include note on service keys

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Fix rotate cert ca test

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Remove periods

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add new test to nightly script

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-16 17:56:17 -07:00
Esteban Esquivel Alvarado
85b261096c Add automation for Restart command for K3s (#7002)
Signed-off-by: est-suse <esteban.esquivel@suse.com>
2023-03-14 15:47:18 -07:00
Roberto Bonafiglia
7d2f997b3e Added multiClusterCIDR E2E test
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-03-14 18:30:52 +01:00
Roberto Bonafiglia
262cd7de0a Added IPv6 check and agent restart on e2e test utils
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-03-14 18:30:52 +01:00
Derek Nola
c259403af1 Bump various dependencies for CVEs (#7044)
* Bump wrangler to 1.1.1
* Match golang.org/x/net with flannel version
* Match golang.org/x/sys with containerd version
* Update gax-go to 2.1.1
* Isolate terraform e2e test with seperate go.mod/go.sum
* Bump containerd

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-13 09:37:45 -07:00
Derek Nola
522ad1e697 Add E2E to Drone (#6890)
* Initial drone vagrant pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Build e2e test image

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add docker registry to E2E pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Bump libvirt image

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add ci flag to secretsencryption

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Fix vagrant log on secretsencryption

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Remove DB parallel tests

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Reduce sonobuoy tests even further

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add local build

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add cron conformance pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add string output for nodes

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Switch snapshot restore for upgrade cluster

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Fix cp

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-10 19:53:41 -08:00
Derek Nola
9efa0797b7 Don't default to local K3s for startup test (#6950)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-02-13 15:00:57 -08:00