Skip to content

Commit 806c41e

Browse files
committed
fix: decrease catalog count to fix unit tests
this commits decreases the number of want catalog to fix the tests. Signed-off-by: Zaki Shaikh <zashaikh@redhat.com>
1 parent e7b6dc2 commit 806c41e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkg/params/settings/default_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestGetCatalogHub(t *testing.T) {
4848
}{
4949
{
5050
name: "good/default catalog",
51-
numCatalogs: 2,
51+
numCatalogs: 1,
5252
hubCatalogs: &sync.Map{},
5353
httpClient: mockHTTPClient,
5454
},
@@ -59,7 +59,7 @@ func TestGetCatalogHub(t *testing.T) {
5959
"catalog-1-url": "https://foo.com",
6060
"catalog-1-name": "tekton",
6161
},
62-
numCatalogs: 3,
62+
numCatalogs: 2,
6363
hubCatalogs: &sync.Map{},
6464
wantLog: "CONFIG: setting custom hub custom, catalog https://foo.com",
6565
httpClient: mockHTTPClient,
@@ -71,7 +71,7 @@ func TestGetCatalogHub(t *testing.T) {
7171
"catalog-1-url": "https://foo.com",
7272
"catalog-1-name": "tekton",
7373
},
74-
numCatalogs: 3,
74+
numCatalogs: 2,
7575
hubCatalogs: &hubCatalog,
7676
wantLog: "",
7777
httpClient: mockHTTPClient,
@@ -83,7 +83,7 @@ func TestGetCatalogHub(t *testing.T) {
8383
"catalog-1-url": "https://bar.com",
8484
"catalog-1-name": "tekton",
8585
},
86-
numCatalogs: 3,
86+
numCatalogs: 2,
8787
hubCatalogs: &hubCatalog,
8888
wantLog: "CONFIG: setting custom hub custom, catalog https://bar.com",
8989
httpClient: mockHTTPClient,
@@ -95,7 +95,7 @@ func TestGetCatalogHub(t *testing.T) {
9595
"catalog-1-url": "https://foo.com",
9696
"catalog-1-name": "tekton",
9797
},
98-
numCatalogs: 3,
98+
numCatalogs: 2,
9999
hubCatalogs: nil,
100100
wantLog: "CONFIG: setting custom hub custom, catalog https://foo.com",
101101
httpClient: mockHTTPClient,
@@ -106,7 +106,7 @@ func TestGetCatalogHub(t *testing.T) {
106106
"catalog-1-id": "custom",
107107
"catalog-1-name": "tekton",
108108
},
109-
numCatalogs: 2,
109+
numCatalogs: 1,
110110
hubCatalogs: &sync.Map{},
111111
wantLog: "CONFIG: hub 1 should have the key catalog-1-url, skipping catalog configuration",
112112
httpClient: mockHTTPClient,
@@ -118,7 +118,7 @@ func TestGetCatalogHub(t *testing.T) {
118118
"catalog-1-name": "tekton",
119119
"catalog-1-url": "",
120120
},
121-
numCatalogs: 2,
121+
numCatalogs: 1,
122122
hubCatalogs: &sync.Map{},
123123
wantLog: "CONFIG: hub 1 catalog configuration have empty value for key catalog-1-url, skipping catalog configuration",
124124
httpClient: mockHTTPClient,
@@ -130,7 +130,7 @@ func TestGetCatalogHub(t *testing.T) {
130130
"catalog-1-url": "https://foo.com",
131131
"catalog-1-name": "tekton",
132132
},
133-
numCatalogs: 2,
133+
numCatalogs: 1,
134134
hubCatalogs: &sync.Map{},
135135
wantLog: "CONFIG: custom hub catalog name cannot be https, skipping catalog configuration",
136136
httpClient: mockHTTPClient,
@@ -142,7 +142,7 @@ func TestGetCatalogHub(t *testing.T) {
142142
"catalog-1-url": "/u1!@1!@#$afoo.com",
143143
"catalog-1-name": "tekton",
144144
},
145-
numCatalogs: 2,
145+
numCatalogs: 1,
146146
hubCatalogs: &sync.Map{},
147147
wantLog: "catalog url /u1!@1!@#$afoo.com is not valid, skipping catalog configuration",
148148
httpClient: mockHTTPClient,

0 commit comments

Comments
 (0)