Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compose.libre.sh
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
ecobytes
compose.libre.sh
Commits
11cf094c
Commit
11cf094c
authored
10 years ago
by
Pierre Ozoux
Browse files
Options
Downloads
Patches
Plain Diff
Adds tests \o/
parent
5d6d2544
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tests/clean-image.sh
+8
-0
8 additions, 0 deletions
tests/clean-image.sh
tests/image.sh
+40
-0
40 additions, 0 deletions
tests/image.sh
tests/main.sh
+19
-0
19 additions, 0 deletions
tests/main.sh
tests/runtime-clean-image.sh
+10
-0
10 additions, 0 deletions
tests/runtime-clean-image.sh
with
77 additions
and
0 deletions
tests/clean-image.sh
0 → 100755
+
8
−
0
View file @
11cf094c
#!/bin/bash -eux
image
=
$1
/data/indiehosters/tests/runtime-clean-image.sh
$image
rm
-rf
/data/domains/
$image
.test
ssh core@backup.dev
"rm -rf
$image
.test"
This diff is collapsed.
Click to expand it.
tests/image.sh
0 → 100755
+
40
−
0
View file @
11cf094c
#!/bin/bash -eux
cp
/data/indiehosters/unit-files/
*
/etc/systemd/system
&&
sudo
systemctl daemon-reload
image
=
$1
# prepare data
mkdir
-p
/data/import/
$image
.test/TLS
cp
/data/indiehosters/scripts/unsecure-certs/example.dev.pem /data/import/
$image
.test/TLS/
$image
.test.pem
if
[
"
$image
"
==
"static-git"
]
;
then
mkdir
-p
/data/import/
$image
.test/static-git
echo
"https://github.com/indiehosters/website.git"
>
/data/import/
$image
.test/static-git/GITURL
fi
# start image from import
systemctl start
$image
@
$image
.test
if
[
"
$image
"
==
"wordpress"
]
;
then
sleep
40
else
sleep
10
fi
# tests
systemctl list-units |
grep
"
$image
\.
test"
|
grep
-c
failed |
grep
0
ip
=
`
docker inspect
--format
{{
.NetworkSettings.IPAddress
}}
$image
-
$image
.test
`
curl
-L
$ip
# start image from backup
/data/indiehosters/tests/runtime-clean-image.sh
$image
if
[
"
$image
"
==
"wordpress"
]
;
then
echo
should fail
until
implementation of mysql backup importer
fi
systemctl start
$image
@
$image
.test
sleep
10
# tests
systemctl list-units |
grep
"
$image
\.
test"
|
grep
-c
failed |
grep
0
ip
=
`
docker inspect
--format
{{
.NetworkSettings.IPAddress
}}
$image
-
$image
.test
`
curl
$ip
This diff is collapsed.
Click to expand it.
tests/main.sh
0 → 100755
+
19
−
0
View file @
11cf094c
#!/bin/bash -eux
# testing static
/data/indiehosters/tests/image.sh static
# clean static tests
/data/indiehosters/tests/clean-image.sh static
# testing static-git
/data/indiehosters/tests/image.sh static-git
# clean static tests
/data/indiehosters/tests/clean-image.sh static-git
# testing wordpress
/data/indiehosters/tests/image.sh wordpress
# clean static tests
/data/indiehosters/tests/clean-image.sh wordpress
This diff is collapsed.
Click to expand it.
tests/runtime-clean-image.sh
0 → 100755
+
10
−
0
View file @
11cf094c
#!/bin/bash -eux
image
=
$1
systemctl stop
*
@
$image
.test.timer
systemctl stop
*
@
$image
.test
systemctl reset-failed
systemctl list-units |
grep
-c
"
$image
\.
test"
|
grep
0
rm
-rf
/data/import/
$image
.test
rm
-rf
/data/runtime/domains/
$image
.test
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