Skip to content

Use K3S host cluster for E2E tests#492

Merged
galal-hussein merged 24 commits intorancher:mainfrom
galal-hussein:k3s_host_cluster
Oct 8, 2025
Merged

Use K3S host cluster for E2E tests#492
galal-hussein merged 24 commits intorancher:mainfrom
galal-hussein:k3s_host_cluster

Conversation

@galal-hussein
Copy link
Collaborator

@galal-hussein galal-hussein commented Oct 3, 2025

The PR uses k3s as a host cluster for e2e tests instead of using docker, docker now should be optional to use by setting environment variable K3K_DOCKER_INSTALL

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
@galal-hussein galal-hussein changed the title K3s host cluster Use K3S host cluster for E2E tests Oct 3, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.02%. Comparing base (80037e8) to head (c9e7862).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #492      +/-   ##
==========================================
+ Coverage   53.21%   57.02%   +3.80%     
==========================================
  Files          53       56       +3     
  Lines        6459     6559     +100     
==========================================
+ Hits         3437     3740     +303     
+ Misses       2763     2550     -213     
- Partials      259      269      +10     
Flag Coverage Δ
cli 51.58% <ø> (+1.21%) ⬆️
controller 57.93% <ø> (+5.69%) ⬆️
e2e 57.93% <ø> (+5.69%) ⬆️
unit 40.79% <ø> (-0.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

@enrichman enrichman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! As agreed I would use the make test-e2e command to just run the tests, on the targeted cluster. I would not use it to install (we already have a command for that).

I'm just thinking if we could avoid the E2E_KUBECONFIG var and use simply the current KUBECONFIG. If we are just running the tests it should be fine, and also it will be more predictable and easy to understand. If I'm an external user I would need to know that I need to export this particular variable, but maybe it's easier to just use what I am targeting. Also because if I am using the make install to update the installation of K3k I will need to remember that they are pointing to different variable. A bit confusing IMHO. Wdyt?

NIT: please add a small description to the PRs!

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file was not supposed to be committed.

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

@enrichman enrichman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a great one! Thanks Hussein, love it!

@galal-hussein galal-hussein merged commit a0fd472 into rancher:main Oct 8, 2025
6 checks passed
@galal-hussein galal-hussein deleted the k3s_host_cluster branch October 18, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants