Skip to content

🐛 test framework: fix e2e config provider's kustomize resource loading using a go getter url #12360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions test/framework/clusterctl/e2e_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,14 +508,9 @@ func (c *E2EConfig) AbsPaths(basePath string) {
provider := &c.Providers[i]
for j := range provider.Versions {
version := &provider.Versions[j]
if version.Type != URLSource && version.Value != "" {
if !filepath.IsAbs(version.Value) {
version.Value = filepath.Join(basePath, version.Value)
}
} else if version.Type == URLSource && version.Value != "" {
// Skip error, will be checked later when loading contents from URL
if version.Value != "" {
Copy link
Member

@fabriziopandini fabriziopandini Jun 21, 2025

Choose a reason for hiding this comment

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

Can we add a unit test for this function, so it will also act as a documentation of all the combinations we support + prevent future regressions?

// Skip error, will be checked later when loading contents from URL or file path
u, _ := url.Parse(version.Value)

if u != nil {
switch u.Scheme {
case "", fileURIScheme:
Expand Down