Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
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
Service Desk
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 JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chenhao Ma
core
Commits
4e744ba9
Commit
4e744ba9
authored
8 years ago
by
Ryan Sanford
Browse files
Options
Downloads
Patches
Plain Diff
Define supported dockerized test execution
parent
7727e13c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+3
-0
3 additions, 0 deletions
Dockerfile
TESTING.md
+26
-0
26 additions, 0 deletions
TESTING.md
test/Dockerfile
+0
-24
0 additions, 24 deletions
test/Dockerfile
with
29 additions
and
24 deletions
Dockerfile
+
3
−
0
View file @
4e744ba9
...
...
@@ -67,6 +67,9 @@ RUN pip install --upgrade pip wheel setuptools \
&&
pip
install
-r
/var/scitran/code/api/requirements-docker.txt
\
&&
pip
install
-r
/var/scitran/code/api/requirements.txt
COPY
test /var/scitran/code/api/test/
RUN
bash
-e
-x
/var/scitran/code/api/test/bin/setup-integration-tests-ubuntu.sh
# Copy full repo
#
...
...
This diff is collapsed.
Click to expand it.
TESTING.md
+
26
−
0
View file @
4e744ba9
...
...
@@ -12,6 +12,32 @@
./test/bin/run-tests-ubuntu.sh
```
### Docker
```
# Execute this from the root of this repository
# Build the docker image
docker build -t scitran-core .
# Launch Mongo isinstance
docker run --name some-mongo -d mongo
# Execute tests
docker run \
--rm \
--name scitran-core-tester \
-e "SCITRAN_PERSISTENT_DB_URI=mongodb://some-mongo:27017/scitran" \
--link some-mongo \
-v $(pwd):/var/scitran/code/api \
--entrypoint bash \
scitran-core \
/var/scitran/code/api/test/bin/run-tests-ubuntu.sh
# Stop and remove mongo container
docker rm -v -f some-mongo
```
### Tools
-
[
abao
](
https://github.com/cybertk/abao/
)
-
[
postman
](
https://www.getpostman.com/docs/
)
...
...
This diff is collapsed.
Click to expand it.
test/Dockerfile
deleted
100644 → 0
+
0
−
24
View file @
7727e13c
FROM
python:2.7
ENV
MONGO_PATH='mongodb://mongo:27017/scitran'
ENV
BASE_URL='http://scitran-core:8080/api'
VOLUME
/usr/src/tests
WORKDIR
/usr/src/tests
COPY
integration_tests/requirements-integration-test.txt requirements.txt
RUN
pip
install
-r
requirements.txt
# Install node for testing tools
# We need node >= 4.0 for newman so install from node-source repo
# Need to install apt support for https to access these urls
RUN
apt-get update
&&
apt-get
install
-y
apt-transport-https
RUN
curl
--silent
https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
RUN
echo
"deb https://deb.nodesource.com/node_5.x trusty main"
|
tee
/etc/apt/sources.list.d/nodesource.list
RUN
echo
"deb-src https://deb.nodesource.com/node_5.x trusty main"
|
tee
-a
/etc/apt/sources.list.d/nodesource.list
RUN
apt-get update
&&
apt-get
-y
install
nodejs
# Install newman for running postman collection tests from CLI
RUN
npm
install
-g
/usr/src/tests
ENTRYPOINT
["py.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