Skip to content

Add format to verify target #200

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

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ TEST_PKGS:=$(shell go list ./...)
test-unit: ## Run the unit tests
$(Q)go test -count=1 -short ${TEST_PKGS}

verify: manifests generate
verify: manifests generate format
git diff --exit-code

# Utilities.
Expand Down
2 changes: 1 addition & 1 deletion crds/zz_defs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkg/validation/internal/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ func validateServiceAccounts(bundle *manifests.Bundle) []errors.Error {
sa := v1.ServiceAccount{}
if err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &sa); err == nil {
if _, ok := saNamesFromCSV[sa.Name]; ok {
errs = append(errs, errors.ErrInvalidBundle(fmt.Sprintf("invalid service account found in bundle. " +
"This service account %s in your bundle is not valid, because a service account with the same name " +
"was already specified in your CSV. If this was unintentional, please remove the service account " +
"manifest from your bundle. If it was intentional to specify a separate service account, " +
"please rename the SA in either the bundle manifest or the CSV.",sa.Name), sa.Name))
errs = append(errs, errors.ErrInvalidBundle(fmt.Sprintf("invalid service account found in bundle. "+
"This service account %s in your bundle is not valid, because a service account with the same name "+
"was already specified in your CSV. If this was unintentional, please remove the service account "+
"manifest from your bundle. If it was intentional to specify a separate service account, "+
"please rename the SA in either the bundle manifest or the CSV.", sa.Name), sa.Name))
}
}
}
Expand Down