Skip to content

Commit dfd4353

Browse files
pkalsi97squakez
authored andcommitted
fix(e2e): add first-readiness metric test with DeploymentTimestamp logic
1 parent bf4406c commit dfd4353

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

e2e/advanced/operator_metrics_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,11 @@ func TestMetrics(t *testing.T) {
478478
t.Run("Integration first readiness metric", func(t *testing.T) {
479479
var ts1, ts2 time.Time
480480

481-
// The start time is taken from the Integration status initialization timestamp
481+
// Use DeploymentTimestamp if available (for dry-build), else use InitializationTimestamp
482482
ts1 = it.Status.InitializationTimestamp.Time
483+
if it.Status.DeploymentTimestamp != nil && !it.Status.DeploymentTimestamp.IsZero() {
484+
ts1 = it.Status.DeploymentTimestamp.Time
485+
}
483486
g.Expect(ts1).NotTo(BeZero())
484487
// The end time is reported into the ready condition first truthy time
485488
ts2 = it.Status.GetCondition(v1.IntegrationConditionReady).FirstTruthyTime.Time

0 commit comments

Comments
 (0)