Skip to content

Commit

Permalink
fix: avoid failing the artifacts save when JUnit processing failed (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 authored Feb 6, 2025
1 parent 3fdef60 commit 126a91c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/testworkflow-toolkit/artifacts/junit_post_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,16 @@ func (p *JUnitPostProcessor) Start() error {
return nil
}

// Add checks if the file is a JUnit report and sends it to the cloud.
func (p *JUnitPostProcessor) Add(path string) error {
err := p.add(path)
if err != nil {
fmt.Printf("warn: JUnit processing: %s: %s\n", path, err)
}
return nil
}

// Add checks if the file is a JUnit report and sends it to the cloud.
func (p *JUnitPostProcessor) add(path string) error {
uploadPath := path
if p.pathPrefix != "" {
uploadPath = filepath.Join(p.pathPrefix, uploadPath)
Expand Down

0 comments on commit 126a91c

Please sign in to comment.