Skip to content

Commit

Permalink
fix(RHTAPBUGS-883): make sure revision is set (konflux-ci#829)
Browse files Browse the repository at this point in the history
In fixing RHTAPBUGS-880 we found out that the policy did not correctly
handle undefined source revision, which lead to RHTAPBUGS-883.

Before we merge RHTAPBUGS-883 we need to make sure that the revision is
passed via the parameters to EC so that the change for fixing
RHTAPBUGS-883 doesn't break e2e tests.
  • Loading branch information
zregvart authored Oct 18, 2023
1 parent 962b1e8 commit 4994ca7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/build/build_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ var _ = framework.BuildSuiteDescribe("Build templates E2E test", Label("build",
}
Expect(kubeadminClient.TektonController.CreateOrUpdatePolicyConfiguration(testNamespace, policy)).To(Succeed())

pipelineRun, err := kubeadminClient.HasController.GetComponentPipelineRun(componentNames[i], applicationName, testNamespace, "")
Expect(err).ToNot(HaveOccurred())

rev := pipelineRun.Annotations["pipelinesascode.tekton.dev/sha"]

generator := tekton.VerifyEnterpriseContract{
Snapshot: v1alpha1.SnapshotSpec{
Application: applicationName,
Expand All @@ -295,7 +300,8 @@ var _ = framework.BuildSuiteDescribe("Build templates E2E test", Label("build",
Source: v1alpha1.ComponentSource{
ComponentSourceUnion: v1alpha1.ComponentSourceUnion{
GitSource: &v1alpha1.GitSource{
URL: gitUrl,
URL: gitUrl,
Revision: rev,
},
},
},
Expand Down

0 comments on commit 4994ca7

Please sign in to comment.