diff --git a/cmd/flux/get_artifact_generator.go b/cmd/flux/get_artifact_generator.go index 0a336cbb..2f00ee2e 100644 --- a/cmd/flux/get_artifact_generator.go +++ b/cmd/flux/get_artifact_generator.go @@ -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), } diff --git a/cmd/flux/get_test.go b/cmd/flux/get_test.go index 0281cc75..daf9e897 100644 --- a/cmd/flux/get_test.go +++ b/cmd/flux/get_test.go @@ -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"],