Validate Helm source URL schemes
Reject HelmRepository source URLs with schemes unsupported by the source-controller API before generating or applying the object. Signed-off-by: Immanuel Tikhonov <pchpr.00@list.ru> Assisted-by: codex/gpt-5
This commit is contained in:
@@ -36,6 +36,12 @@ func TestCreateSourceHelm(t *testing.T) {
|
||||
resultFile: "name is required",
|
||||
assertFunc: "assertError",
|
||||
},
|
||||
{
|
||||
name: "unsupported URL scheme",
|
||||
args: "create source helm podinfo --url=git://example.com/charts --export",
|
||||
resultFile: "url scheme 'git' not supported, can be: http, https and oci",
|
||||
assertFunc: "assertError",
|
||||
},
|
||||
{
|
||||
name: "OCI repo",
|
||||
args: "create source helm podinfo --url=oci://ghcr.io/stefanprodan/charts/podinfo --interval 5m --export",
|
||||
|
||||
Reference in New Issue
Block a user