Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geosphere-deploy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cspp_geo
geosphere
geosphere-deploy
Commits
5aa2724f
Verified
Commit
5aa2724f
authored
3 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Update CI integration tests to run curl on target cluster
parent
e81ea851
No related branches found
Branches containing commit
Tags
gamma-test-r20220119_1834
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci_tests/_tests_common.sh
+17
-11
17 additions, 11 deletions
ci_tests/_tests_common.sh
with
17 additions
and
11 deletions
ci_tests/_tests_common.sh
+
17
−
11
View file @
5aa2724f
...
...
@@ -86,6 +86,12 @@ wait_for_pod() {
kubectl
-n
$ns
wait
--for
=
condition
=
Ready
${
pod_name
}
--timeout
=
120s
}
run_remote_curl_pod
()
{
pod_prefix
=
$1
curl_target
=
$2
kubectl run
-it
--rm
--restart
=
Never curl-test-
${
pod_prefix
}
--image
=
curlimages/curl:7.81.0
--
curl
--fail
-N
-sS
"
${
curl_target
}
"
}
run_grb_checks
()
{
count
=
0
while
true
;
do
...
...
@@ -141,7 +147,7 @@ run_tile_gen_checks() {
run_mapserver_checks
()
{
# Ex: ["2020-11-24T22:23:19", "2020...
# Get the first element without quotes
first_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01"
|
head
-c
21 |
tail
-c
19
)
first_time
=
$(
run_remote_curl_pod
"
$MAPSERVER_RELEASE_NAME
"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01"
|
head
-c
21 |
tail
-c
19
)
debug
"MapServer first time:
${
first_time
}
"
# if there aren't any times then we failed
if
[[
"
${
first_time
}
"
==
""
]]
;
then
...
...
@@ -154,9 +160,9 @@ run_mapserver_checks() {
run_mapserver_postgres_checks
()
{
# Ex: ["2020-11-24T22:23:19", "2020...
# Get the first element without quotes
first_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=DESC"
|
head
-c
21 |
tail
-c
19
)
first_time
=
$(
run_remote_curl_pod
"
${
MAPSERVER_RELEASE_NAME
}
1"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=DESC"
|
head
-c
21 |
tail
-c
19
)
debug
"MapServer first time:
${
first_time
}
"
last_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC"
|
head
-c
21 |
tail
-c
19
)
last_time
=
$(
run_remote_curl_pod
"
${
MAPSERVER_RELEASE_NAME
}
2"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC"
|
head
-c
21 |
tail
-c
19
)
debug
"MapServer last time:
${
last_time
}
"
# if there aren't any times then we failed
if
[[
"
${
first_time
}
"
==
""
]]
;
then
...
...
@@ -166,10 +172,10 @@ run_mapserver_postgres_checks() {
return
1
fi
all_times
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=DESC"
)
all_times
=
$(
run_remote_curl_pod
"
${
MAPSERVER_RELEASE_NAME
}
3"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=DESC"
)
echo
"All times:
${
all_times
}
"
one_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=1"
|
wc
-m
)
two_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=2"
|
wc
-m
)
one_time
=
$(
run_remote_curl_pod
"
${
MAPSERVER_RELEASE_NAME
}
4"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=1"
|
wc
-m
)
two_time
=
$(
run_remote_curl_pod
"
${
MAPSERVER_RELEASE_NAME
}
5"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=2"
|
wc
-m
)
debug
"MapServer one time size:
${
one_time
}
"
debug
"MapServer two time size:
${
two_time
}
"
# ["2020-12-25T15:29:25"] + newline(?)
...
...
@@ -183,8 +189,8 @@ run_mapserver_postgres_checks() {
# fi
# 2020-04-10T17:02:21
near_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=1&start_time=2020-04-10T17:02:21"
|
wc
-m
)
too_late_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=1&start_time=2020-04-11T17:02:21"
|
wc
-m
)
near_time
=
$(
run_remote_curl_pod
"
${
MAPSERVER_RELEASE_NAME
}
6"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=1&start_time=2020-04-10T17:02:21"
|
wc
-m
)
too_late_time
=
$(
run_remote_curl_pod
"
${
MAPSERVER_RELEASE_NAME
}
7"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01?order=ASC&num_times=1&start_time=2020-04-11T17:02:21"
|
wc
-m
)
debug
"MapServer near time size:
${
near_time
}
"
if
[[
${
near_time
}
-ne
24
]]
;
then
return
1
...
...
@@ -198,14 +204,14 @@ run_mapserver_postgres_checks() {
}
run_mapcache_checks
()
{
first_time
=
$(
curl
--fail
-N
-sS
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01"
|
head
-c
21 |
tail
-c
19
)
first_time
=
$(
run_remote_curl_pod
"
${
MAPCACHE_RELEASE_NAME
}
1"
"http://
${
MAPSERVER_RELEASE_NAME
}
.
${
ns
}
/wms_times/g16/abi/radm1/C01"
|
head
-c
21 |
tail
-c
19
)
debug
"MapServer first time:
${
first_time
}
"
curl
--fail
"http://
${
MAPCACHE_RELEASE_NAME
}
.
${
ns
}
/mapcache/wmts/?TIME=
${
first_time
}
Z&TILEMATRIXSET=grid_g16_abi_radf_1000m&LAYER=g16_abi_radm1_l1b_C01&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=0&TileCol=0&TileRow=0"
>
/dev/null
run_remote_curl_pod
"
${
MAPCACHE_RELEASE_NAME
}
2"
"http://
${
MAPCACHE_RELEASE_NAME
}
.
${
ns
}
/mapcache/wmts/?TIME=
${
first_time
}
Z&TILEMATRIXSET=grid_g16_abi_radf_1000m&LAYER=g16_abi_radm1_l1b_C01&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=0&TileCol=0&TileRow=0"
>
/dev/null
}
run_client_checks
()
{
# just try to load the webpage at all
curl
"http://
${
CLIENT_RELEASE_NAME
}
.
${
ns
}
/"
>
/dev/null
run_remote_curl_pod
"
${
CLIENT_RELEASE_NAME
}
"
"http://
${
CLIENT_RELEASE_NAME
}
.
${
ns
}
/"
>
/dev/null
}
check_and_uninstall
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment