Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
8a5b26c9
Commit
8a5b26c9
authored
Nov 22, 2016
by
Feanil Patel
Committed by
Bilal Ahmad
Nov 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run tests using the es and mongo containers with docker-compose.
parent
ad8f29b5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
24 deletions
+11
-24
.travis.yml
+0
-1
.travis/run_tests.sh
+4
-19
config/mongoid.yml
+1
-3
docker-compose-travis.yml
+6
-1
No files found.
.travis.yml
View file @
8a5b26c9
...
@@ -11,7 +11,6 @@ cache: bundler
...
@@ -11,7 +11,6 @@ cache: bundler
before_install
:
before_install
:
-
docker-compose -f docker-compose-travis.yml up -d
-
docker-compose -f docker-compose-travis.yml up -d
-
docker exec forum_testing chmod +x /edx/app/forum/cs_comments_service/.travis/run_tests.sh
script
:
script
:
-
docker exec forum_testing /edx/app/forum/cs_comments_service/.travis/run_tests.sh
-
docker exec forum_testing /edx/app/forum/cs_comments_service/.travis/run_tests.sh
.travis/run_tests.sh
View file @
8a5b26c9
#!/bin/bash -xe
#!/bin/bash -xe
.
/edx/app/forum/forum_env
.
/edx/app/forum/forum_env
.
/edx/app/forum/ruby_env
.
/edx/app/forum/ruby_env
export
MONGOHQ_URL
=
"mongodb://mongo.edx:27017/cs_comments_service_test"
gem update bundler
# Ensure we use the latest version of bundler. Travis' default version of outdated.
cd
/edx/app/forum/cs_comments_service
# install java
curl
-L
-C
-
-b
"oraclelicense=accept-securebackup-cookie"
-O
http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
tar
-xvzf
jdk-8u111-linux-x64.tar.gz
-C
/opt
export
JAVA_HOME
=
/opt/jdk1.8.0_111/
export
PATH
=
/opt/jdk1.8.0_111/bin:
$PATH
# Run Elasticsearch as a daemon
gem update bundler
# Ensure we use the latest version of bundler. Travis' default version of outdated.
curl
-O
https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.13.zip
unzip elasticsearch-0.90.13.zip
elasticsearch-0.90.13/bin/elasticsearch
sleep 10
# Run MongoDB as a daemon
bundle install
curl
-O
https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.12.tgz
tar
-zxf
mongodb-linux-x86_64-3.0.12.tgz
export
PATH
=
mongodb-linux-x86_64-3.0.12/bin:
$PATH
mkdir
-p
./mongo/db
mkdir
-p
./mongo/log
mongod
--fork
--dbpath
./mongo/db
--logpath
./mongo/log/mongodb.log
--storageEngine
wiredTiger
bundle
exec
rspec
bundle
exec
rspec
config/mongoid.yml
View file @
8a5b26c9
...
@@ -24,9 +24,7 @@ test:
...
@@ -24,9 +24,7 @@ test:
clients
:
clients
:
default
:
default
:
<<
:
*default_client
<<
:
*default_client
database
:
cs_comments_service_test
<<
:
*default_uri
hosts
:
-
localhost:27017
production
:
production
:
clients
:
clients
:
...
...
docker-compose-travis.yml
View file @
8a5b26c9
...
@@ -2,11 +2,16 @@
...
@@ -2,11 +2,16 @@
version
:
"
2"
version
:
"
2"
services
:
services
:
elasticsearch
:
image
:
edxops/elasticsearch:latest
container_name
:
"
es.edx"
mongo
:
image
:
mongo:3.0.12
container_name
:
"
mongo.edx"
forum
:
forum
:
image
:
edxops/forums:latest
image
:
edxops/forums:latest
container_name
:
forum_testing
container_name
:
forum_testing
volumes
:
volumes
:
-
.:/edx/app/forum/cs_comments_service
-
.:/edx/app/forum/cs_comments_service
-
$HOME/.gem:/edx/app/forum/.gem
command
:
tail -f /dev/null
command
:
tail -f /dev/null
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment