Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
caosdb-mysqlbackend
Commits
5d876bcd
Unverified
Commit
5d876bcd
authored
4 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Added MariaDB Docker option to test targets in makefile.
parent
561676e4
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
makefile
+18
-0
18 additions, 0 deletions
makefile
tests/docker_env/.config
+11
-0
11 additions, 0 deletions
tests/docker_env/.config
tests/docker_env/config.defaults
+1
-0
1 addition, 0 deletions
tests/docker_env/config.defaults
with
33 additions
and
0 deletions
CHANGELOG.md
+
3
−
0
View file @
5d876bcd
...
...
@@ -39,6 +39,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`get_head_version`
,
`get_head_relative`
,
`get_version_history`
.
The versions are tracked internally by the
`_iversion`
field which is an
integer and which should not be used outside of the backend.
*
New makefile targets for testing with MariaDB instance from Docker image: call
`make test-docker`
to temporarily start a Docker container with MariaDB which
will be used for the unit tests.
### Changed ###
...
...
This diff is collapsed.
Click to expand it.
makefile
+
18
−
0
View file @
5d876bcd
...
...
@@ -51,3 +51,21 @@ drop-%:
.PHONY
:
test
test
:
./utils/make_db
test
--fresh
# Run tests with a database which is started in a Docker container
.PHONY
:
test-docker
test-docker
:
@
docker
kill
caosdb-mysqlserver-test
||
true
@
docker container
rm
caosdb-mysqlserver-test
||
true
@
docker run
--name
caosdb-mysqlserver-test
-p
"3306:3306"
\
-e
MYSQL_ROOT_PASSWORD
=
"pass-for-test"
-d
mariadb
@
sleep
10
MAINPATH
=
$(
realpath
tests/docker_env
)
utils/make_db
test
--fresh
@
docker
kill
caosdb-mysqlserver-test
@
docker container
rm
caosdb-mysqlserver-test
# if automatic stopping failed
.PHONY
:
test-docker-stop
test-docker-stop
:
docker
kill
caosdb-mysqlserver-test
docker container
rm
caosdb-mysqlserver-test
This diff is collapsed.
Click to expand it.
tests/docker_env/.config
0 → 100644
+
11
−
0
View file @
5d876bcd
# Config for tests with a Docker SQL server
# The host of the MySQL server.
MYSQL_HOST
=
127
.
0
.
0
.
1
# The port number of the MySQL server.
MYSQL_PORT
=
3306
# The user for the installation. Note: This is not the user
# which will then be used by the CaosDB Server.
MYSQL_USER
=
root
MYSQL_USER_PASSWORD
=
pass
-
for
-
test
DATABASE_USER_HOST_LIST
=
127
.
0
.
0
.
1
,%,
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tests/docker_env/config.defaults
0 → 120000
+
1
−
0
View file @
5d876bcd
../../config.defaults
\ No newline at end of file
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