From 7abf1ac0cc2c9156a16557d532da5d365b662423 Mon Sep 17 00:00:00 2001 From: "Adam D. Cornett" Date: Tue, 7 May 2024 09:20:56 -0700 Subject: [PATCH] fix test results update to send entire payload since it is required by pyxis Signed-off-by: Adam D. Cornett --- internal/pyxis/submit.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/pyxis/submit.go b/internal/pyxis/submit.go index fd9d7119..8d86f634 100644 --- a/internal/pyxis/submit.go +++ b/internal/pyxis/submit.go @@ -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) } @@ -130,7 +127,7 @@ func (p *pyxisClient) SubmitResults(ctx context.Context, certInput *Certificatio return &CertificationResults{ CertProject: certProject, CertImage: certImage, - TestResults: updatedTestResults, + TestResults: testResults, }, nil }