Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libnginx-mod-http-dav-ext
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Nginx
libnginx-mod-http-dav-ext
Commits
19908a09
Verified
Commit
19908a09
authored
2 years ago
by
Jan Mojžíš
Browse files
Options
Downloads
Patches
Plain Diff
d/t/generic rework
parent
11e2e950
No related branches found
No related tags found
No related merge requests found
Pipeline
#471340
passed
2 years ago
Stage: provisioning
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/changelog
+7
-0
7 additions, 0 deletions
debian/changelog
debian/tests/generic
+66
-13
66 additions, 13 deletions
debian/tests/generic
with
73 additions
and
13 deletions
debian/changelog
+
7
−
0
View file @
19908a09
libnginx-mod-http-dav-ext (1:3.0.0-3) UNRELEASED; urgency=medium
* d/t/generic rework. The test now checks module after
installation/reload/restart.
-- Jan Mojžíš <jan.mojzis@gmail.com> Fri, 16 Dec 2022 04:39:48 +0100
libnginx-mod-http-dav-ext (1:3.0.0-2) unstable; urgency=medium
* d/control: added Multi-Arch: foreign
...
...
This diff is collapsed.
Click to expand it.
debian/tests/generic
+
66
−
13
View file @
19908a09
#!/bin/sh
set
-e
# version 20221215
# generic test that only verifies that nginx is running with the given
# generic test that only verifies that nginx is running with the given
# libnginx-... module
# - after installation
# - after nginx reload
# - after nginx restart
cat
<<
EOF
> "/etc/nginx/sites-enabled/default"
server {
listen 80 default_server;
EX
=
0
CURL_CMD
=
"curl --max-time 60 --silent --fail -o /dev/null"
location /generic {
return 200;
}
}
EOF
#change directory to $AUTOPKGTEST_TMP
cd
"
${
AUTOPKGTEST_TMP
}
"
nginx
-t
invoke-rc.d nginx restart
||
{
journalctl
-n
all
-xu
nginx.service
;
exit
1
;
}
echo
-n
"curl after installation: http status="
if
$CURL_CMD
-w
"response_code: %{http_code}, ... "
http://127.0.0.1/
;
then
echo
"OK"
else
EX
=
1
echo
"FAILED"
fi
curl
--fail
-w
"response_code: %{http_code}
\n
"
http://127.0.0.1/generic
echo
-n
"nginx reload ... "
if
invoke-rc.d nginx reload
;
then
echo
"OK"
else
EX
=
1
echo
"FAILED"
fi
sleep
5
echo
-n
"curl after reload: http status="
if
$CURL_CMD
-w
"response_code: %{http_code}, ... "
http://127.0.0.1/
;
then
echo
"OK"
else
EX
=
1
echo
"FAILED"
fi
echo
-n
"nginx restart ... "
if
invoke-rc.d nginx restart
;
then
echo
"OK"
else
EX
=
1
echo
"FAILED"
fi
sleep
5
echo
-n
"curl after restart: http status="
if
$CURL_CMD
-w
"response_code: %{http_code}, ... "
http://127.0.0.1/
;
then
echo
"OK"
else
EX
=
1
echo
"FAILED"
fi
if
[
${
EX
}
-ne
0
]
;
then
echo
"=== journalctl ==="
journalctl
-n
all
-xu
nginx.service
||
:
echo
"=== error.log ==="
if
[
`
wc
-l
/var/log/nginx/error.log |
cut
-d
' '
-f1
`
-gt
100
]
;
then
head
-n
50 /var/log/nginx/error.log
echo
'...'
tail
-n
50 /var/log/nginx/error.log
else
cat
/var/log/nginx/error.log
fi
fi
exit
${
EX
}
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