Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FaaS-DB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
edugain
FaaS-DB
Commits
07be10b9
Commit
07be10b9
authored
4 years ago
by
Dariusz Janny
Browse files
Options
Downloads
Patches
Plain Diff
[
faas#9
] test suite for faas-db added.
parent
5ba15646
No related branches found
No related tags found
1 merge request
!3
Master
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+6
-0
6 additions, 0 deletions
Makefile
README.md
+3
-0
3 additions, 0 deletions
README.md
test/faas-db-tests.bats
+38
-0
38 additions, 0 deletions
test/faas-db-tests.bats
with
47 additions
and
0 deletions
Makefile
+
6
−
0
View file @
07be10b9
...
@@ -32,5 +32,11 @@ stop: # stop container
...
@@ -32,5 +32,11 @@ stop: # stop container
version
:
#
print current component version
version
:
#
print current component version
@
echo
${
FAAS_DB_VERSION
}
@
echo
${
FAAS_DB_VERSION
}
test
:
testFaasDB
#
run all tests
testFaasDB
:
#
run checking docker image tests
@
echo
"# run test version"
bats
test
/faas-db-tests.bats
help
:
#
this help
help
:
#
this help
@
awk
'BEGIN {FS = ":.*?# "} /^[a-zA-Z_-]+:.*?# / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
$(
MAKEFILE_LIST
)
@
awk
'BEGIN {FS = ":.*?# "} /^[a-zA-Z_-]+:.*?# / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
$(
MAKEFILE_LIST
)
This diff is collapsed.
Click to expand it.
README.md
+
3
−
0
View file @
07be10b9
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
## structure
## structure
`_conf/`
_ - directory with configuration files
`_conf/`
_ - directory with configuration files
`test/`
- directory with tests files
## build image
## build image
To build
`faas-db`
docker image
To build
`faas-db`
docker image
...
@@ -26,4 +27,6 @@ up build and run container
...
@@ -26,4 +27,6 @@ up build and run container
logs print docker logs
logs print docker logs
stop stop container
stop stop container
version print current component version
version print current component version
test run all tests
testFaasDB run checking docker image tests
`
`
This diff is collapsed.
Click to expand it.
test/faas-db-tests.bats
0 → 100644
+
38
−
0
View file @
07be10b9
#! /usr/bin/env bats
@test "faas-db - checking version in variables" {
[ $FAAS_DB_VERSION = "1.0-SNAPSHOT" ]
}
@test "faas-db - checking app name in variables" {
[ $FAAS_DB_NAME = "faas-db" ]
}
@test "faas-db - checking image string in variables" {
[ $FAAS_DB_IMAGE = "faas/faas-db:1.0-SNAPSHOT" ]
}
@test "faas-db - checking version in image file" {
run docker exec $FAAS_DB_NAME bash -c 'cat /faas-docker-version'
[ "$output" = "1.0-SNAPSHOT" ]
}
@test "faas-db - checking app name in image file" {
run docker exec $FAAS_DB_NAME bash -c 'cat /faas-docker-name'
[ "$output" = "faas-db" ]
}
@test "faas-db - checking image string in image file" {
run docker exec $FAAS_DB_NAME bash -c 'cat /faas-docker-image'
[ "$output" = "faas/faas-db:1.0-SNAPSHOT" ]
}
@test "faas-db - checking DB version in client command" {
run docker exec $FAAS_DB_NAME bash -c 'mysql --version'
[ "$output" = "mysql Ver 15.1 Distrib 10.5.8-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2" ]
}
@test "faas-db - checking DB version in running DB instance" {
run docker exec $FAAS_DB_NAME bash -c "mysql --disable-column-names -uroot -p${MYSQL_ROOT_PASSWORD} mysql -e 'select version();'"
[ "$output" = "10.5.8-MariaDB-1:10.5.8+maria~focal" ]
}
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