Skip to content
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 @@ -168,7 +168,7 @@ test-docs: ## Test doc links
.PHONY: test-unit
TEST_PKGS = $(shell $(GO) list ./... | grep -v -E 'github.com/operator-framework/operator-sdk/test/')
test-unit: ## Run unit tests
$(GO) test -tags=$(GO_BUILD_TAGS) -coverprofile=coverage.out -covermode=count -short $(TEST_PKGS)
CGO_ENABLED=1 $(GO) test -race -tags=$(GO_BUILD_TAGS) -coverprofile=coverage.out -covermode=atomic -short $(TEST_PKGS)

e2e_tests := test-e2e-go test-e2e-helm test-e2e-integration
e2e_targets := test-e2e $(e2e_tests)
Expand Down
12 changes: 8 additions & 4 deletions internal/validate/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,17 @@ func RunExternalValidators(ctx context.Context, entrypoints []string, bundleRoot
dec := json.NewDecoder(stdout)
dec.DisallowUnknownFields()

if err := dec.Decode(&manifestresults[i]); err != nil {
fmt.Printf("decode failed: %v\n", err)
return nil, err
}
decodeErr := dec.Decode(&manifestresults[i])
// Always wait for the command to finish to ensure stderr is fully written
// and all goroutines complete before returning.
if err := cmd.Wait(); err != nil {
return nil, err
}
// Return decode error after waiting for command to complete
if decodeErr != nil {
fmt.Printf("decode failed: %v\n", decodeErr)
return nil, decodeErr
}
}
return manifestresults, nil
}
Loading