Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
LOFAR2.0
tango
Commits
5c841b53
Commit
5c841b53
authored
2 years ago
by
Corné Lukken
Browse files
Options
Downloads
Plain Diff
Merge branch '
L2SS-914
' into 'master'
Resolve
L2SS-914
Closes
L2SS-914
See merge request
!401
parents
b39b5d99
1f7429d7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!401
Resolve L2SS-914
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+2
-0
2 additions, 0 deletions
.gitlab-ci.yml
docker-compose/Makefile
+3
-2
3 additions, 2 deletions
docker-compose/Makefile
sbin/run_integration_test.sh
+4
-0
4 additions, 0 deletions
sbin/run_integration_test.sh
tangostationcontrol/tox.ini
+2
-0
2 additions, 0 deletions
tangostationcontrol/tox.ini
with
11 additions
and
2 deletions
.gitlab-ci.yml
+
2
−
0
View file @
5c841b53
...
@@ -529,6 +529,7 @@ unit_test:
...
@@ -529,6 +529,7 @@ unit_test:
-
tangostationcontrol/.coverage
-
tangostationcontrol/.coverage
integration_test_docker
:
integration_test_docker
:
stage
:
integration-tests
stage
:
integration-tests
allow_failure
:
true
image
:
docker:latest
image
:
docker:latest
tags
:
tags
:
-
privileged
-
privileged
...
@@ -551,6 +552,7 @@ integration_test_docker:
...
@@ -551,6 +552,7 @@ integration_test_docker:
tag="$CI_COMMIT_REF_SLUG"
tag="$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
fi
-
apk update
-
apk add --update make bash docker-compose
-
apk add --update make bash docker-compose
-
apk add --update bind-tools
-
apk add --update bind-tools
-
apk add --update postgresql14-client gzip
-
apk add --update postgresql14-client gzip
...
...
This diff is collapsed.
Click to expand it.
docker-compose/Makefile
+
3
−
2
View file @
5c841b53
...
@@ -150,7 +150,8 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \
...
@@ -150,7 +150,8 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \
CONTAINER_NAME_PREFIX
=
$(
CONTAINER_NAME_PREFIX
)
\
CONTAINER_NAME_PREFIX
=
$(
CONTAINER_NAME_PREFIX
)
\
COMPOSE_IGNORE_ORPHANS
=
true
\
COMPOSE_IGNORE_ORPHANS
=
true
\
CONTAINER_EXECUTION_UID
=
$(
shell
id
-u
)
\
CONTAINER_EXECUTION_UID
=
$(
shell
id
-u
)
\
DOCKER_GID
=
$(
DOCKER_GID
)
DOCKER_GID
=
$(
DOCKER_GID
)
\
TEST_MODULE
=
$(
INTEGRATION_MODULE
)
.PHONY
:
up down minimal context run integration start stop restart build build-nocache status clean pull help
.PHONY
:
up down minimal context run integration start stop restart build build-nocache status clean pull help
...
@@ -174,7 +175,7 @@ run: minimal ## run a service using arguments and delete it afterwards
...
@@ -174,7 +175,7 @@ run: minimal ## run a service using arguments and delete it afterwards
$(
DOCKER_COMPOSE_ARGS
)
docker-compose
$(
COMPOSE_FILE_ARGS
)
run
--no-deps
--rm
$(
SERVICE
)
$(
SERVICE_ARGS
)
$(
DOCKER_COMPOSE_ARGS
)
docker-compose
$(
COMPOSE_FILE_ARGS
)
run
--no-deps
--rm
$(
SERVICE
)
$(
SERVICE_ARGS
)
integration
:
minimal
##
run a service using arguments and delete it afterwards
integration
:
minimal
##
run a service using arguments and delete it afterwards
TEST_MODULE
=
$(
INTEGRATION_MODULE
)
$(
DOCKER_COMPOSE_ARGS
)
docker-compose
$(
COMPOSE_FILE_ARGS
)
run
--no-deps
--rm
integration-test
$(
INTEGRATION_ARGS
)
$(
DOCKER_COMPOSE_ARGS
)
docker-compose
$(
COMPOSE_FILE_ARGS
)
run
--no-deps
--rm
integration-test
$(
INTEGRATION_ARGS
)
down
:
##
stop all services and tear down the system
down
:
##
stop all services and tear down the system
$(
DOCKER_COMPOSE_ARGS
)
docker-compose
$(
COMPOSE_FILE_ARGS
)
down
$(
DOCKER_COMPOSE_ARGS
)
docker-compose
$(
COMPOSE_FILE_ARGS
)
down
...
...
This diff is collapsed.
Click to expand it.
sbin/run_integration_test.sh
+
4
−
0
View file @
5c841b53
...
@@ -24,12 +24,16 @@ function integration_test {
...
@@ -24,12 +24,16 @@ function integration_test {
IFS
=
" "
read
-r
-a
restarts
<<<
"
${
2
}
"
IFS
=
" "
read
-r
-a
restarts
<<<
"
${
2
}
"
IFS
=
" "
read
-r
-a
configs
<<<
"
${
3
}
"
IFS
=
" "
read
-r
-a
configs
<<<
"
${
3
}
"
for
config
in
"
${
configs
[@]
}
"
;
do
for
config
in
"
${
configs
[@]
}
"
;
do
echo
"Updating config
${
config
}
..."
bash
"
${
LOFAR20_DIR
}
"
/sbin/update_ConfigDb.sh
"
${
config
}
"
bash
"
${
LOFAR20_DIR
}
"
/sbin/update_ConfigDb.sh
"
${
config
}
"
done
done
if
[
!
-z
"
${
2
+x
}
"
]
;
then
if
[
!
-z
"
${
2
+x
}
"
]
;
then
# shellcheck disable=SC2145
echo
"make restart
${
restarts
[@]
}
..."
make restart
"
${
restarts
[@]
}
"
make restart
"
${
restarts
[@]
}
"
fi
fi
sleep
5
sleep
5
echo
"make integration
${
1
}
..."
make integration
"
${
1
}
"
make integration
"
${
1
}
"
}
}
...
...
This diff is collapsed.
Click to expand it.
tangostationcontrol/tox.ini
+
2
−
0
View file @
5c841b53
...
@@ -29,12 +29,14 @@ commands = {envpython} -m stestr run {posargs}
...
@@ -29,12 +29,14 @@ commands = {envpython} -m stestr run {posargs}
[testenv:integration]
[testenv:integration]
; Warning running integration tests will make changes to your docker system!
; Warning running integration tests will make changes to your docker system!
; These tests should only be run by the integration-test docker container.
; These tests should only be run by the integration-test docker container.
allowlist_externals
=
echo
passenv
=
TANGO_HOST
passenv
=
TANGO_HOST
setenv
=
setenv
=
VIRTUAL_ENV
=
{envdir}
VIRTUAL_ENV
=
{envdir}
TESTS_DIR
=
./tangostationcontrol/integration_test/{env:TEST_MODULE:default}
TESTS_DIR
=
./tangostationcontrol/integration_test/{env:TEST_MODULE:default}
PYTHON
=
{envpython} -m coverage run --source tangostationcontrol --parallel-mode
PYTHON
=
{envpython} -m coverage run --source tangostationcontrol --parallel-mode
commands
=
commands
=
echo
"Integration
test
directory
configured
for{env:TESTS_DIR}
({env:TEST_MODULE})"
{envpython}
-m
stestr
run
--serial
{posargs}
{envpython}
-m
stestr
run
--serial
{posargs}
{envpython}
-m
coverage
combine
{envpython}
-m
coverage
combine
{envpython}
-m
coverage
html
--omit
=
'*test*'
-d cover
{envpython}
-m
coverage
html
--omit
=
'*test*'
-d cover
...
...
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