@@ -741,7 +741,7 @@ func TestGetPipelineFunc_V1beta1Pipeline_VerifyNoError(t *testing.T) {
741741 }
742742 for _ , tc := range testcases {
743743 t .Run (tc .name , func (t * testing.T ) {
744- ctx = test .SetupTrustedResourceConfig (ctx , tc .verificationNoMatchPolicy )
744+ ctx : = test .SetupTrustedResourceConfig (context . Background () , tc .verificationNoMatchPolicy )
745745 fn := resources .GetPipelineFunc (ctx , k8sclient , tektonclient , tc .requester , & tc .pipelinerun , tc .policies )
746746
747747 gotResolvedPipeline , gotSource , gotVerificationResult , err := fn (ctx , pipelineRef .Name )
@@ -768,7 +768,6 @@ func TestGetPipelineFunc_V1beta1Pipeline_VerifyNoError(t *testing.T) {
768768}
769769
770770func TestGetPipelineFunc_V1beta1Pipeline_VerifyError (t * testing.T ) {
771- ctx := context .Background ()
772771 tektonclient := fake .NewSimpleClientset ()
773772 signer , _ , k8sclient , vps := test .SetupVerificationPolicies (t )
774773
@@ -863,7 +862,7 @@ func TestGetPipelineFunc_V1beta1Pipeline_VerifyError(t *testing.T) {
863862 }
864863 for _ , tc := range testcases {
865864 t .Run (tc .name , func (t * testing.T ) {
866- ctx = test .SetupTrustedResourceConfig (ctx , tc .verificationNoMatchPolicy )
865+ ctx : = test .SetupTrustedResourceConfig (context . Background () , tc .verificationNoMatchPolicy )
867866 pr := & v1.PipelineRun {
868867 ObjectMeta : metav1.ObjectMeta {Namespace : "trusted-resources" },
869868 Spec : v1.PipelineRunSpec {
@@ -1072,7 +1071,7 @@ func TestGetPipelineFunc_V1Pipeline_VerifyNoError(t *testing.T) {
10721071 }
10731072 for _ , tc := range testcases {
10741073 t .Run (tc .name , func (t * testing.T ) {
1075- ctx = test .SetupTrustedResourceConfig (ctx , tc .verificationNoMatchPolicy )
1074+ ctx : = test .SetupTrustedResourceConfig (context . Background () , tc .verificationNoMatchPolicy )
10761075 fn := resources .GetPipelineFunc (ctx , k8sclient , tektonclient , tc .requester , & tc .pipelinerun , tc .policies )
10771076
10781077 gotResolvedPipeline , gotSource , gotVerificationResult , err := fn (ctx , pipelineRef .Name )
@@ -1099,7 +1098,6 @@ func TestGetPipelineFunc_V1Pipeline_VerifyNoError(t *testing.T) {
10991098}
11001099
11011100func TestGetPipelineFunc_V1Pipeline_VerifyError (t * testing.T ) {
1102- ctx := context .Background ()
11031101 tektonclient := fake .NewSimpleClientset ()
11041102 signer , _ , k8sclient , vps := test .SetupVerificationPolicies (t )
11051103
@@ -1193,7 +1191,7 @@ func TestGetPipelineFunc_V1Pipeline_VerifyError(t *testing.T) {
11931191 }
11941192 for _ , tc := range testcases {
11951193 t .Run (tc .name , func (t * testing.T ) {
1196- ctx = test .SetupTrustedResourceConfig (ctx , tc .verificationNoMatchPolicy )
1194+ ctx : = test .SetupTrustedResourceConfig (context . Background () , tc .verificationNoMatchPolicy )
11971195 pr := & v1.PipelineRun {
11981196 ObjectMeta : metav1.ObjectMeta {Namespace : "trusted-resources" },
11991197 Spec : v1.PipelineRunSpec {
@@ -1215,7 +1213,6 @@ func TestGetPipelineFunc_V1Pipeline_VerifyError(t *testing.T) {
12151213}
12161214
12171215func TestGetPipelineFunc_GetFuncError (t * testing.T ) {
1218- ctx := context .Background ()
12191216 tektonclient := fake .NewSimpleClientset ()
12201217 _ , k8sclient , vps := test .SetupMatchAllVerificationPolicies (t , "trusted-resources" )
12211218
@@ -1259,6 +1256,7 @@ func TestGetPipelineFunc_GetFuncError(t *testing.T) {
12591256 }
12601257 for _ , tc := range testcases {
12611258 t .Run (tc .name , func (t * testing.T ) {
1259+ ctx := context .Background ()
12621260 store := config .NewStore (logging .FromContext (ctx ).Named ("config-store" ))
12631261 featureflags := & corev1.ConfigMap {
12641262 ObjectMeta : metav1.ObjectMeta {
0 commit comments