Commit Graph

66 Commits

Author SHA1 Message Date
ShylajaDevadiga
97c69546c5
add arm tests and upgrade tests (#5526)
Signed-off-by: Shylaja Devadiga <shylaja@rancher.com>
2022-06-15 08:55:05 -07:00
Derek Nola
3f9010683e
Add alternate scripts location (#5692)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-14 17:50:11 -07:00
Derek Nola
12695cea15
E2E: Dualstack test (#5617)
* E2E dualstack test
* Improve testing documentation

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-14 08:40:29 -07:00
Derek Nola
efab09bc1f
E2E Improvements and groundwork for test-pad tool (#5593)
* Add rancher install sript, taints to cp/etcd roles
* Revert back to generic/ubuntu2004, libvirt networking is unreliable on opensuse
* Added support for alpine
* Rancher deployment script
* Refactor installType into function
* Cleanup splitserver test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-13 13:36:26 -07:00
Derek Nola
168b14b08e
Integration Test: Startup (#5630)
* New startup integration test
* Add testing section to PR template
* Move helper functions to direct k8s client calls

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-13 13:32:13 -07:00
Brad Davidson
bac8cf45cb Add apparmor-parser to OpenSUSE/SLE Micro test VMs
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-05-11 14:39:07 -07:00
Brad Davidson
c8447dca56 Bump golang to 1.18.1
Also update all use of 'go get' => 'go install', update CI tooling for
1.18 compatibility, and gofmt everything so lint passes.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-05-11 14:39:07 -07:00
Brad Davidson
ce5b9347c9 Replace DefaultProxyDialerFn dialer injection with EgressSelector support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 17:54:36 -07:00
Brad Davidson
418c3fa858
Fix issue with datastore corruption on cluster-reset (#5515)
* Bump etcd to v3.5.4-k3s1
* Fix issue with datastore corruption on cluster-reset
* Disable unnecessary components during cluster reset

Disable control-plane components and the tunnel setup during
cluster-reset, even when not doing a restore. This reduces the amount of
log clutter during cluster reset/restore, making any errors encountered
more obvious.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-27 13:44:15 -07:00
Derek Nola
3307d53f8f
E2E Validation Improvements (#5444)
* Add basic none option EXTERNAL_DB, uses internal sqlite

* Move to Leap as default

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-04-18 09:41:43 -07:00
Derek Nola
809f0cf05b
Added option to deploy hardened k3s (#5415)
Added option to deploy hardened k3s

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-04-14 15:00:48 -07:00
Derek Nola
3bd7cdfa1b
Bump Reencryption Test timeout, improve comments (#5431)
* Bump timeout, improve comments

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

* codespell

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-04-14 11:46:37 -07:00
ShylajaDevadiga
5cb4894a50
fixes and updates to jenkinsfile (#5370)
Signed-off-by: Shylaja Devadiga <shylaja.devadiga@suse.com>
Signed-off-by: Shylaja Devadiga <shylaja@rancher.com>
2022-04-13 08:55:05 -07:00
Hussein Galal
483eadb59a
Add certificate rotation integration tests (#5393)
* Add certificate rotation integration tests

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

* fix data dir in cert rotation

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

* fix comments

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

* fix comments

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2022-04-08 20:03:31 +02:00
ShylajaDevadiga
7f067d7fcd
Refactor automation using terraform (#5268)
Signed-off-by: Shylaja Devadiga <shylaja.devadiga@suse.com>
2022-03-18 13:03:45 -07:00
Derek Nola
b28796a5ce
Replace CentOS 8 with Rocky Linux 8 for install testing (#5279)
* Replace CentOS 8 with Rocky 8 for install testing

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-18 09:01:04 -07:00
Derek Nola
4eed971289
E2E Split Server Test (#5286)
* Simplify role in existing tests
* Update other tests to output vagrant log on failure
* go test for split server

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-17 16:56:10 -07:00
Derek Nola
1f7abe5dbb
Testing directory and documentation rework. (#5256)
* Removed vagrant folder
* Fix comments around E2E ENVs
* Eliminate testutil folder
* Convert flock integration test to unit test
* Point to other READMEs

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-15 10:29:56 -07:00
Luther Monson
9a849b1bb7
[master] changing package to k3s-io (#4846)
* changing package to k3s-io

Signed-off-by: Luther Monson <luther.monson@gmail.com>

Co-authored-by: Derek Nola <derek.nola@suse.com>
2022-03-02 15:47:27 -08:00
Derek Nola
38ed1a6750
E2E Add external DB options to ValidateCluster test (#5157)
* Initial mysql, postgres external db
* Convert test options to env variables
* Add explicit ETCD option and bump memory for docker node

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-02 12:42:55 -08:00
Brad Davidson
4b064b5d22 Wait for process to exit before returning from kill helper
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-01 11:56:52 -08:00
Derek Nola
6e397aa42e
E2E secrets encryption test (#5144)
* Dump vagrant log on creation failure
* Update RunCmdOnNode to add quotes
* secrets encryption e2e test

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-01 11:28:39 -08:00
Brad Davidson
2989b8b2c5 Remove unnecessary copies of runtime struct
Several types contained redundant references to ControlRuntime data. Switch to consistently accessing this via config.Runtime instead.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-02-28 12:05:16 -08:00
Derek Nola
299ca60009
Move testing lock from server creation to test start (#5155)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-25 08:42:21 -08:00
Derek Nola
830c330aad
E2E Test Improvements (#5102)
* Fix infinite while loop on failure, reduce upgradecluster

* DRY code

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-10 09:27:00 -08:00
Derek Nola
e28be2912c
Migrate Ginkgo testing framework to V2, consolidate integration tests (#5097)
* Upgrade and convert ginkgo from v1 to v2
* Move all integration tests into integration folder
* Update TESTING.md

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-09 08:22:53 -08:00
Hussein Galal
13728058a4
Add k3s etcd restoration integration test (#5014)
* Add k3s etcd restoration test

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

* Fix tests and rebase

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

* Reorganizing the tests

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

* Fixing comments

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

* Fix etcd restore

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

* dont check for errors when restoring

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

* use eventually to test for restoration

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

* fix tests

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

* fix golint

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2022-02-08 21:24:34 +02:00
ShylajaDevadiga
35582e6213
Fix cluster validation and add upgrade cluster test (#5020)
Signed-off-by: Shylaja Devadiga <shylaja@rancher.com>

Co-authored-by: Derek Nola <derek.nola@suse.com>
2022-02-08 09:34:57 -08:00
Jossemar Cordero
466a7f4535
Update CentOS 8 smoke vm's with vault repositories (#5092)
Update CentOS 8 smoke vm's with vault repositories

Problem: CentOS 8 reached its EOL alongside its public mirrors, making
all the smoke test fail at provisioning time.

Solution: Point all the CentOS repositories to vault.

Signed-off-by: Jonnatan Jossemar Cordero <jonnatan.cordero@suse.com>
2022-02-08 10:03:19 -06:00
Derek Nola
9bd101c120
Add new upgradecluster E2E test (#4900)
* validatecluster fixes

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-01-19 18:48:59 -08:00
Derek Nola
2ac8df3602
Integration tests utilities improvements (#4832)
* Remove sudo commands from integration tests

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

* Added cleanup fucntion

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

* Implement better int cleanup

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

* Rename test utils

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

* Enable K3sCmd to be a single string

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

* Removed parsePod function

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

* codespell

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

* Revert startup timeout

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

* Reorder sonobuoy tests, drop concurrent tests to 3

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

* Disable etcd

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

* Skip parallel testing for etcd

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-01-06 08:05:56 -08:00
Derek Nola
d0f7e23328
Require integration test to be run as sudo/root (#4824)
* Remove internal sudo commands from integration tests
* Run integration CI as sudo

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-22 14:48:21 -08:00
Derek Nola
a02db0f2fa
Fix cgroup smoke test (#4823)
* Fixed control group vagrantfile so running vagrant up doesn't fail locally

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-22 12:16:43 -08:00
ShylajaDevadiga
6656d48415
Add tests to use vagrantfile (#4722)
* Add tests to use vagrantfile

Signed-off-by: Shylaja Devadiga <shylaja.devadiga@suse.com>

* Removed outdated e2e tests.
* Removed Terraform

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

Co-authored-by: Shylaja Devadiga <shylaja.devadiga@suse.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2021-12-22 09:51:48 -08:00
Derek Nola
bcb662926d
Secrets-encryption rotation (#4372)
* Regular CLI framework for encrypt commands
* New secrets-encryption feature
* New integration test
* fixes for flaky integration test CI
* Fix to bootstrap on restart of existing nodes
* Consolidate event recorder

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-07 14:31:32 -08:00
Derek Nola
a8f7e9f7e8
Nighlty automation vagrant rework (#4574)
* Initial vagrantfile for createcluster test

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-03 15:56:52 -08:00
Jacob Blain Christen
c77efe64e1
tests/vagrant: refactor vagrant smoke tests (#4484)
- updated `tests/TESTING.md`
- cgroup, snapshotter, and install tests all under tests/vagrant
- cgroup and snapshotter workflows trigger for all code changes on all branches (excluding markdown docs, install script, and other vagrant tests)
- install workflow triggers for relevant script and fixture changes, only on master or pull-requests that target it
- integration and unit test workflows should not trigger for install script changes nor anything under tests/vagrant

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2021-11-15 11:50:38 -07:00
Chris Kim
f18b3252c0
[master] Add etcd extra args support for K3s (#4463)
* Add etcd extra args support for K3s

Signed-off-by: Chris Kim <oats87g@gmail.com>

* Add etcd custom argument integration test

Signed-off-by: Chris Kim <oats87g@gmail.com>

* go generate

Signed-off-by: Chris Kim <oats87g@gmail.com>
2021-11-11 21:03:15 -08:00
Derek Nola
d85b2468ea
Corrected skip check for dualstack on CI (#4427)
Signed-off-by: dereknola <derek.nola@suse.com>
2021-11-08 16:27:44 -07:00
Jacob Blain Christen
559c8ad94b
install: /usr/sbin/transactional-update (#4403)
- also updated k3s-uninstall.sh on zypper and TU systems
- fix #4409 for Fedora CoreOS

new installer tests via github actions:
- fedora-coreos
- opensuse-microos

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2021-11-08 16:26:21 -07:00
Derek Nola
aa3332085f
Update k3s CI to run all integration tests (#4358)
* Update k3s integration CI so all tests run
* Add check for ipv6 to skip test in Github CI
Signed-off-by: dereknola <derek.nola@suse.com>
2021-11-02 11:37:16 -07:00
Jacob Blain Christen
702fe24afe
containerd/cri: enable the btrfs snapshotter (#4316)
* vendor: btrfs
* enable the btrfs snapshotter
* testing: snapshotter/btrfs

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2021-10-29 23:31:33 -07:00
Jacob Blain Christen
52eb6cac1c
install.sh: initial support for sle-micro (#4331)
Support invoking install.sh on SLE Micro with or without SELinux
enabled. Same deal for SLES.

Additionally, easy-to-invoke assertions, via Vagrant, that the local
install.sh works correctly:
- tests/install/centos-7 (stand-in for rhel 7)
- tests/install/centos-8 (stand-in for rhel 8)
- tests/install/opensuse-leap (stand-in for sles)
- tests/install/opensuse-microos (stand-in for sle-micro)
- tests/install/ubuntu-focal

Addresses #3188
Addresses #3917

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2021-10-29 09:47:37 -07:00
Derek Nola
7c3f21e581
K3s Integration test fixes (#4341)
* Move tests into sub folders
* Updated documentation
* Prevent infinite loop is user has not made k3s

Signed-off-by: dereknola <derek.nola@suse.com>
2021-10-28 12:35:28 -07:00
Brad Davidson
5a923ab8dc Add containerd ready channel to delay etcd node join
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-10-14 14:03:52 -07:00
Brian Downs
ac7a8d89c6
Add ability to reconcile bootstrap data between datastore and disk (#3398) 2021-10-07 12:47:00 -07:00
Manuel Buil
9fcd79baae Add tests to the dual-stack PR and enable dual-stack with flannel backend
Signed-off-by: Manuel Buil <mbuil@suse.com>
2021-09-15 14:11:54 +02:00
Derek Nola
60297a1bbe
Creation of K3s integration test Sonobuoy plugin (#3931)
* Added test runner and build files
* Changes to int test to output junit results.
* Updated documentation, removed comments

Signed-off-by: dereknola <derek.nola@suse.com>
2021-08-30 08:27:59 -07:00
Derek Nola
114b30277f
Redux: Enable K3s integration test to run on existing cluster (#3905)
* Made it possible to run int tests on existing cluster

Signed-off-by: dereknola <derek.nola@suse.com>
2021-08-26 16:26:19 -07:00
Derek Nola
66dacc6ee0
Revert "Enable K3s integration test to run on existing cluster (#3892)" (#3899)
This reverts commit 703b5af950.
2021-08-24 07:26:14 -07:00