Skip to content

Commit

Permalink
fix test results update to send entire payload since it is required b…
Browse files Browse the repository at this point in the history
…y pyxis

Signed-off-by: Adam D. Cornett <[email protected]>
  • Loading branch information
acornett21 committed May 7, 2024
1 parent 375ed07 commit 7abf1ac
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions internal/pyxis/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ func (p *pyxisClient) SubmitResults(ctx context.Context, certInput *Certificatio
}

// Update the test results with the certification image id to link the results to the image.
updatedTestResults := &TestResults{
ID: testResults.ID,
ImageID: certImage.ID,
}
testResults.ImageID = certImage.ID

updatedTestResults, err = p.updateTestResults(ctx, updatedTestResults)
testResults, err = p.updateTestResults(ctx, testResults)
if err != nil {
return nil, fmt.Errorf("could not update test results: %v", err)
}
Expand All @@ -130,7 +127,7 @@ func (p *pyxisClient) SubmitResults(ctx context.Context, certInput *Certificatio
return &CertificationResults{
CertProject: certProject,
CertImage: certImage,
TestResults: updatedTestResults,
TestResults: testResults,
}, nil
}

Expand Down

0 comments on commit 7abf1ac

Please sign in to comment.