Skip to content

Commit

Permalink
tests: Use proper timeouts in gitrepository and helmrepository tests
Browse files Browse the repository at this point in the history
I assume using "interval" for timeouts was an accident and "timeout" was
actually meant to be used. This also fixes flakiness of tests.
  • Loading branch information
codablock committed Apr 25, 2022
1 parent eb0feb0 commit c2f3664
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions controllers/gitrepository_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
},
Spec: sourcev1.GitRepositorySpec{
Interval: metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: timeout},
},
}

Expand Down Expand Up @@ -653,7 +653,7 @@ func TestGitRepositoryReconciler_reconcileSource_checkoutStrategy(t *testing.T)
},
Spec: sourcev1.GitRepositorySpec{
Interval: metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: timeout},
URL: server.HTTPAddress() + repoPath,
Reference: tt.reference,
},
Expand Down Expand Up @@ -1517,7 +1517,7 @@ func TestGitRepositoryReconciler_ConditionsUpdate(t *testing.T) {
URL: server.HTTPAddress() + repoPath,
GitImplementation: sourcev1.GoGitImplementation,
Interval: metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: timeout},
},
}

Expand Down
2 changes: 1 addition & 1 deletion controllers/helmrepository_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func TestHelmRepositoryReconciler_reconcileSource(t *testing.T) {
},
Spec: sourcev1.HelmRepositorySpec{
Interval: metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: interval},
Timeout: &metav1.Duration{Duration: timeout},
},
}

Expand Down

0 comments on commit c2f3664

Please sign in to comment.