Skip to content

Commit 9c3fd53

Browse files
authored
K8SPG-836: Update PG operator with 2.8.0 images (#452)
1 parent 575e079 commit 9c3fd53

File tree

4 files changed

+603
-2
lines changed

4 files changed

+603
-2
lines changed

api-tests/apply_route_test.go

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestApplyShouldReturnJustOneVersion(t *testing.T) {
5252

5353
pgParams := &version_service.VersionServiceApplyParams{
5454
Apply: "latest",
55-
OperatorVersion: "2.7.0",
55+
OperatorVersion: "2.8.0",
5656
Product: "pg-operator",
5757
}
5858
pgParams.WithTimeout(2 * time.Second)
@@ -132,7 +132,7 @@ func TestApplyPgShouldReturnSameMajorVersion(t *testing.T) {
132132

133133
pgParams := &version_service.VersionServiceApplyParams{
134134
Apply: "latest",
135-
OperatorVersion: "2.7.0",
135+
OperatorVersion: "2.8.0",
136136
Product: "pg-operator",
137137
}
138138
pgParams.WithTimeout(2 * time.Second)
@@ -849,6 +849,11 @@ func TestApplyPGReturnedVersions(t *testing.T) {
849849
version string
850850
}{
851851
// test latest
852+
{"latest", "2.8.0", "", "17.6"},
853+
{"latest", "2.8.0", "16.10", "16.10"},
854+
{"latest", "2.8.0", "15.14", "15.14"},
855+
{"latest", "2.8.0", "14.19", "14.19"},
856+
{"latest", "2.8.0", "13.22", "13.22"},
852857
{"latest", "2.7.0", "", "17.5.2"},
853858
{"latest", "2.7.0", "16.9", "16.9"},
854859
{"latest", "2.7.0", "15.13", "15.13"},
@@ -895,6 +900,11 @@ func TestApplyPGReturnedVersions(t *testing.T) {
895900
{"latest", "2.2.0", "12.14", "12.14"},
896901

897902
// test recommended
903+
{"recommended", "2.8.0", "", "17.6"},
904+
{"recommended", "2.8.0", "16.10", "16.10"},
905+
{"recommended", "2.8.0", "15.14", "15.14"},
906+
{"recommended", "2.8.0", "14.19", "14.19"},
907+
{"recommended", "2.8.0", "13.22", "13.22"},
898908
{"recommended", "2.7.0", "", "17.5.2"},
899909
{"recommended", "2.7.0", "16.9", "16.9"},
900910
{"recommended", "2.7.0", "15.13", "15.13"},
@@ -940,6 +950,11 @@ func TestApplyPGReturnedVersions(t *testing.T) {
940950
{"recommended", "2.2.0", "12.14", "12.14"},
941951

942952
// test exact
953+
{"17.6", "2.8.0", "", "17.6"},
954+
{"16.10", "2.8.0", "", "16.10"},
955+
{"15.14", "2.8.0", "", "15.14"},
956+
{"14.19", "2.8.0", "", "14.19"},
957+
{"13.22", "2.8.0", "", "13.22"},
943958
{"17.5.2", "2.7.0", "", "17.5.2"},
944959
{"16.9", "2.7.0", "", "16.9"},
945960
{"15.13", "2.7.0", "", "15.13"},
@@ -1004,6 +1019,11 @@ func TestApplyPGReturnedVersions(t *testing.T) {
10041019
{"14.11", "1.6.0", "", "14.11"},
10051020

10061021
//test with suffix
1022+
{"13-latest", "2.8.0", "", "13.22"},
1023+
{"14-latest", "2.8.0", "", "14.19"},
1024+
{"15-latest", "2.8.0", "", "15.14"},
1025+
{"16-latest", "2.8.0", "", "16.10"},
1026+
{"17-latest", "2.8.0", "", "17.6"},
10071027
{"13-latest", "2.7.0", "", "13.21"},
10081028
{"14-latest", "2.7.0", "", "14.18"},
10091029
{"15-latest", "2.7.0", "", "15.13"},
@@ -1068,6 +1088,11 @@ func TestApplyPGReturnedVersions(t *testing.T) {
10681088
{"14-latest", "1.6.0", "", "14.11"},
10691089

10701090
// test with distribution suffix
1091+
{"latest", "2.8.0", "13.22 - Percona Distribution", "13.22"},
1092+
{"latest", "2.8.0", "14.19 - Percona Distribution", "14.19"},
1093+
{"latest", "2.8.0", "15.14 - Percona Distribution", "15.14"},
1094+
{"latest", "2.8.0", "16.10 - Percona Distribution", "16.10"},
1095+
{"latest", "2.8.0", "17.6 - Percona Distribution", "17.6"},
10711096
{"latest", "2.7.0", "13.21 - Percona Distribution", "13.21"},
10721097
{"latest", "2.7.0", "14.18 - Percona Distribution", "14.18"},
10731098
{"latest", "2.7.0", "15.13 - Percona Distribution", "15.13"},

api-tests/operator_route_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ func TestOperatorRouteShouldReturnRightOperatorVersion(t *testing.T) {
7272
{"pg-operator", "2.5.1"},
7373
{"pg-operator", "2.6.0"},
7474
{"pg-operator", "2.7.0"},
75+
{"pg-operator", "2.8.0"},
7576
{"ps-operator", "0.5.0"},
7677
{"ps-operator", "0.6.0"},
7778
{"ps-operator", "0.7.0"},
@@ -249,6 +250,7 @@ func TestOperatorRoutePgShouldReturnNotEmptyResponses(t *testing.T) {
249250
{"pg-operator", "2.5.1"},
250251
{"pg-operator", "2.6.0"},
251252
{"pg-operator", "2.7.0"},
253+
{"pg-operator", "2.8.0"},
252254
}
253255

254256
for _, c := range cases_v2 {
Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
{
2+
"pgbackrest":{
3+
"17.6":{
4+
">=":[
5+
{
6+
"var":"productVersion"
7+
},
8+
"17.6"
9+
]
10+
},
11+
"16.10":{
12+
"and":[
13+
{
14+
">=":[
15+
{
16+
"var":"productVersion"
17+
},
18+
"16.10"
19+
]
20+
},
21+
{
22+
"<":[
23+
{
24+
"var":"productVersion"
25+
},
26+
"17.0"
27+
]
28+
}
29+
]
30+
},
31+
"15.14":{
32+
"and":[
33+
{
34+
">=":[
35+
{
36+
"var":"productVersion"
37+
},
38+
"15.14"
39+
]
40+
},
41+
{
42+
"<":[
43+
{
44+
"var":"productVersion"
45+
},
46+
"16.0"
47+
]
48+
}
49+
]
50+
},
51+
"14.19":{
52+
"and":[
53+
{
54+
">=":[
55+
{
56+
"var":"productVersion"
57+
},
58+
"14.19"
59+
]
60+
},
61+
{
62+
"<":[
63+
{
64+
"var":"productVersion"
65+
},
66+
"15.0"
67+
]
68+
}
69+
]
70+
},
71+
"13.22":{
72+
"and":[
73+
{
74+
">=":[
75+
{
76+
"var":"productVersion"
77+
},
78+
"13.22"
79+
]
80+
},
81+
{
82+
"<":[
83+
{
84+
"var":"productVersion"
85+
},
86+
"14.0"
87+
]
88+
}
89+
]
90+
}
91+
},
92+
"postgis":{
93+
"17.6":{
94+
">=":[
95+
{
96+
"var":"productVersion"
97+
},
98+
"17.6"
99+
]
100+
},
101+
"16.10":{
102+
"and":[
103+
{
104+
">=":[
105+
{
106+
"var":"productVersion"
107+
},
108+
"16.10"
109+
]
110+
},
111+
{
112+
"<":[
113+
{
114+
"var":"productVersion"
115+
},
116+
"17.0"
117+
]
118+
}
119+
]
120+
},
121+
"15.14":{
122+
"and":[
123+
{
124+
">=":[
125+
{
126+
"var":"productVersion"
127+
},
128+
"15.14"
129+
]
130+
},
131+
{
132+
"<":[
133+
{
134+
"var":"productVersion"
135+
},
136+
"16.0"
137+
]
138+
}
139+
]
140+
},
141+
"14.19":{
142+
"and":[
143+
{
144+
">=":[
145+
{
146+
"var":"productVersion"
147+
},
148+
"14.19"
149+
]
150+
},
151+
{
152+
"<":[
153+
{
154+
"var":"productVersion"
155+
},
156+
"15.0"
157+
]
158+
}
159+
]
160+
},
161+
"13.22":{
162+
"and":[
163+
{
164+
">=":[
165+
{
166+
"var":"productVersion"
167+
},
168+
"13.22"
169+
]
170+
},
171+
{
172+
"<":[
173+
{
174+
"var":"productVersion"
175+
},
176+
"14.0"
177+
]
178+
}
179+
]
180+
}
181+
},
182+
"pgbouncer":{
183+
"17.6":{
184+
">=":[
185+
{
186+
"var":"productVersion"
187+
},
188+
"17.6"
189+
]
190+
},
191+
"16.10":{
192+
"and":[
193+
{
194+
">=":[
195+
{
196+
"var":"productVersion"
197+
},
198+
"16.10"
199+
]
200+
},
201+
{
202+
"<":[
203+
{
204+
"var":"productVersion"
205+
},
206+
"17.0"
207+
]
208+
}
209+
]
210+
},
211+
"15.14":{
212+
"and":[
213+
{
214+
">=":[
215+
{
216+
"var":"productVersion"
217+
},
218+
"15.14"
219+
]
220+
},
221+
{
222+
"<":[
223+
{
224+
"var":"productVersion"
225+
},
226+
"16.0"
227+
]
228+
}
229+
]
230+
},
231+
"14.19":{
232+
"and":[
233+
{
234+
">=":[
235+
{
236+
"var":"productVersion"
237+
},
238+
"14.19"
239+
]
240+
},
241+
{
242+
"<":[
243+
{
244+
"var":"productVersion"
245+
},
246+
"15.0"
247+
]
248+
}
249+
]
250+
},
251+
"13.22":{
252+
"and":[
253+
{
254+
">=":[
255+
{
256+
"var":"productVersion"
257+
},
258+
"13.22"
259+
]
260+
},
261+
{
262+
"<":[
263+
{
264+
"var":"productVersion"
265+
},
266+
"14.0"
267+
]
268+
}
269+
]
270+
}
271+
}
272+
}

0 commit comments

Comments
 (0)