Skip to content

Commit

Permalink
On integration test for timestamp
Browse files Browse the repository at this point in the history
Fix issue with unknown strategy Kind
  • Loading branch information
qu1queee committed Feb 13, 2024
1 parent 56df211 commit 06cd598
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/integration/buildrun_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,24 @@ var _ = Describe("Checking BuildRun Status fields", func() {
// Use an empty strategy to only have the source step
strategy := tb.Catalog.ClusterBuildStrategy(strategyName)
Expect(tb.CreateClusterBuildStrategy(strategy)).To(Succeed())

cbs := v1beta1.ClusterBuildStrategyKind
// Setup BuildRun with fixed revision where we know the commit details
Expect(tb.CreateBR(&v1beta1.BuildRun{
ObjectMeta: metav1.ObjectMeta{Name: buildRunName},
Spec: v1beta1.BuildRunSpec{
Build: v1beta1.ReferencedBuild{
Build: &v1beta1.BuildSpec{
Strategy: v1beta1.Strategy{Kind: (*v1beta1.BuildStrategyKind)(&strategy.Kind), Name: strategy.Name},
Source: v1beta1.Source{
Type: v1beta1.GitType,
GitSource: &v1beta1.Git{
URL: "https://github.com/shipwright-io/sample-go",
Revision: pointer.String("v0.1.0"),
},
},
Strategy: v1beta1.Strategy{
Kind: &cbs,
Name: strategy.Name,
},
},
},
},
Expand All @@ -73,15 +76,18 @@ var _ = Describe("Checking BuildRun Status fields", func() {
// Use an empty strategy to only have the source step
strategy := tb.Catalog.ClusterBuildStrategy(strategyName)
Expect(tb.CreateClusterBuildStrategy(strategy)).To(Succeed())

cbs := v1beta1.ClusterBuildStrategyKind
// Setup BuildRun with fixed image sha where we know the timestamp details
Expect(tb.CreateBR(&v1beta1.BuildRun{

ObjectMeta: metav1.ObjectMeta{Name: buildRunName},
Spec: v1beta1.BuildRunSpec{
Build: v1beta1.ReferencedBuild{
Build: &v1beta1.BuildSpec{
Strategy: v1beta1.Strategy{Kind: (*v1beta1.BuildStrategyKind)(&strategy.Kind), Name: strategy.Name},
Strategy: v1beta1.Strategy{
Kind: &cbs,
Name: strategy.Name,
},
Source: v1beta1.Source{
Type: v1beta1.OCIArtifactType,
OCIArtifact: &v1beta1.OCIArtifact{
Expand Down

0 comments on commit 06cd598

Please sign in to comment.