@@ -31,6 +31,18 @@ const (
3131 HTTPSPort = 4343
3232)
3333
34+ type gitRepoTestValues struct {
35+ Name string
36+ Repo string
37+ Branch string
38+ PollingInterval string
39+ TargetNamespace string
40+ Path string
41+ CABundle string
42+ HelmSecretName string
43+ HelmSecretNameForPaths string
44+ }
45+
3446var _ = Describe ("Monitoring Git repos via HTTP for change" , Label ("infra-setup" ), func () {
3547 var (
3648 tmpDir string
@@ -100,18 +112,12 @@ var _ = Describe("Monitoring Git repos via HTTP for change", Label("infra-setup"
100112 })
101113
102114 JustBeforeEach (func () {
103- err := testenv .ApplyTemplate (k , testenv .AssetPath ("gitrepo/gitrepo.yaml" ), struct {
104- Name string
105- Repo string
106- Branch string
107- PollingInterval string
108- TargetNamespace string
109- }{
110- gitrepoName ,
111- inClusterRepoURL ,
112- gh .Branch ,
113- "15s" , // default
114- targetNamespace , // to avoid conflicts with other tests
115+ err := testenv .ApplyTemplate (k , testenv .AssetPath ("gitrepo/gitrepo.yaml" ), gitRepoTestValues {
116+ Name : gitrepoName ,
117+ Repo : inClusterRepoURL ,
118+ Branch : gh .Branch ,
119+ PollingInterval : "15s" , // default
120+ TargetNamespace : targetNamespace , // to avoid conflicts with other tests
115121 })
116122 Expect (err ).ToNot (HaveOccurred ())
117123
@@ -157,18 +163,12 @@ var _ = Describe("Monitoring Git repos via HTTP for change", Label("infra-setup"
157163 })
158164
159165 JustBeforeEach (func () {
160- err := testenv .ApplyTemplate (k , testenv .AssetPath ("gitrepo/gitrepo.yaml" ), struct {
161- Name string
162- Repo string
163- Branch string
164- PollingInterval string
165- TargetNamespace string
166- }{
167- gitrepoName ,
168- inClusterRepoURL ,
169- gh .Branch ,
170- "15s" , // default
171- targetNamespace , // to avoid conflicts with other tests
166+ err := testenv .ApplyTemplate (k , testenv .AssetPath ("gitrepo/gitrepo.yaml" ), gitRepoTestValues {
167+ Name : gitrepoName ,
168+ Repo : inClusterRepoURL ,
169+ Branch : gh .Branch ,
170+ PollingInterval : "15s" , // default
171+ TargetNamespace : targetNamespace , // to avoid conflicts with other tests
172172 })
173173 Expect (err ).ToNot (HaveOccurred ())
174174
@@ -270,18 +270,12 @@ var _ = Describe("Monitoring Git repos via HTTP for change", Label("infra-setup"
270270 clone , err = gh .Create (clonedir , testenv .AssetPath ("gitrepo/sleeper-chart" ), "examples" )
271271 Expect (err ).ToNot (HaveOccurred ())
272272
273- err = testenv .ApplyTemplate (k , testenv .AssetPath ("gitrepo/gitrepo.yaml" ), struct {
274- Name string
275- Repo string
276- Branch string
277- PollingInterval string
278- TargetNamespace string
279- }{
280- gitrepoName ,
281- inClusterRepoURL ,
282- gh .Branch ,
283- "24h" , // prevent polling
284- targetNamespace , // to avoid conflicts with other tests
273+ err = testenv .ApplyTemplate (k , testenv .AssetPath ("gitrepo/gitrepo.yaml" ), gitRepoTestValues {
274+ Name : gitrepoName ,
275+ Repo : inClusterRepoURL ,
276+ Branch : gh .Branch ,
277+ PollingInterval : "24h" , // prevent polling
278+ TargetNamespace : targetNamespace , // to avoid conflicts with other tests
285279 })
286280 Expect (err ).ToNot (HaveOccurred ())
287281 })
0 commit comments