Merge pull request #5957 from fluxcd/bug-ag
Some checks are pending
conformance / conform-kubernetes (1.34.1) (push) Waiting to run
conformance / conform-kubernetes (1.35.2) (push) Waiting to run
conformance / conform-kubernetes (1.36.1) (push) Waiting to run
conformance / conform-k3s (1.34.8) (push) Waiting to run
conformance / conform-k3s (1.35.5) (push) Waiting to run
conformance / conform-k3s (1.36.1) (push) Waiting to run
conformance / conform-openshift (4.20.0-okd) (push) Waiting to run
conformance / conform-openshift (4.21.0-okd) (push) Waiting to run
e2e-bootstrap / e2e-boostrap-github (push) Waiting to run
e2e / e2e-amd64-kubernetes (push) Waiting to run
ossf / scorecard (push) Waiting to run
scan / analyze (push) Waiting to run
update / update-components (push) Waiting to run

Fix using Receiver adapter for ArtifactGenerator
This commit is contained in:
Matheus Pimenta 2026-06-28 22:21:55 +01:00 committed by GitHub
commit 4d41251dbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -38,7 +38,7 @@ var getArtifactGeneratorCmd = &cobra.Command{
ValidArgsFunction: resourceNamesCompletionFunc(swapi.GroupVersion.WithKind(swapi.ArtifactGeneratorKind)),
RunE: func(cmd *cobra.Command, args []string) error {
get := getCommand{
apiType: receiverType,
apiType: artifactGeneratorType,
list: artifactGeneratorListAdapter{&swapi.ArtifactGeneratorList{}},
funcMap: make(typeMap),
}

View file

@ -219,6 +219,11 @@ func Test_GetCmdErrors(t *testing.T) {
args: "get helmrelease -n " + tmpl["fluxns"],
assert: assertError(fmt.Sprintf("no HelmRelease objects found in \"%s\" namespace", tmpl["fluxns"])),
},
{
name: "no artifact generators found in namespace",
args: "get artifact generators -n " + tmpl["fluxns"],
assert: assertError(fmt.Sprintf("no ArtifactGenerator objects found in \"%s\" namespace", tmpl["fluxns"])),
},
{
name: "malformed status selector",
args: "get sources git --status-selector Ready -n " + tmpl["fluxns"],