From e4849d4a6d8d3898ac4731aaab5a6ce0ff22f84b Mon Sep 17 00:00:00 2001 From: Sascha Schwarze Date: Wed, 30 Oct 2024 17:47:20 +0100 Subject: [PATCH] Set Build to empty object because GetBuildObject will fill but not initialize it Signed-off-by: Sascha Schwarze --- test/e2e/v1beta1/common_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/v1beta1/common_test.go b/test/e2e/v1beta1/common_test.go index 494ec221d5..a629556082 100644 --- a/test/e2e/v1beta1/common_test.go +++ b/test/e2e/v1beta1/common_test.go @@ -136,14 +136,13 @@ func amendBuild(identifier string, b *buildv1beta1.Build) { // retrieveBuildAndBuildRun will retrieve the build and buildRun func retrieveBuildAndBuildRun(testBuild *utils.TestBuild, namespace string, buildRunName string) (*buildv1beta1.Build, *buildv1beta1.BuildRun, error) { - var build *buildv1beta1.Build - buildrun, err := testBuild.LookupBuildRun(types.NamespacedName{Name: buildRunName, Namespace: namespace}) if err != nil { Logf("Failed to get BuildRun %q: %s", buildRunName, err) return nil, nil, err } + build := &buildv1beta1.Build{} if err := resources.GetBuildObject(testBuild.Context, testBuild.ControllerRuntimeClient, buildrun, build); err != nil { Logf("Failed to get Build from BuildRun %s: %s", buildRunName, err) return nil, buildrun, err