Skip to content

Commit

Permalink
Remove default credentials (#103)
Browse files Browse the repository at this point in the history
* Deactivate and remove credentials to make it public

* Refactor tests in docker
  • Loading branch information
kostia-official authored Feb 20, 2017
1 parent 2b0a5f5 commit 3fe4d68
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ data/
dist
_build/.cache

.env.json
.env*
12 changes: 6 additions & 6 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"url": "DATABASE_URL"
},
"pubsub": {
"id": "bab60de7",
"key": "0nabkCiVoCSxErMPhdsIFQ=="
"id": "PUBSUB_ID",
"key": "PUBSUB_KEY"
},
"email": {
"key": "5pwwJkeIFIVKMbYct3CT2A",
"from": "[email protected]"
"key": "EMAIL_KEY",
"from": "EMAIL_FROM"
},
"push": {
"key": "AKIAJW2SSA6LPZV3NZLA",
"secret": "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",
"key": "PUSH_KEY",
"secret": "PUSH_SECRET",
"region": "us-east-1",
"title": "Outfit",
"appsArns": {
Expand Down
4 changes: 2 additions & 2 deletions test/aws-utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ describe('AWS utils', () => {

const arn = 'arn:aws:sns:us-east-1:093525834944:app/APNS_SANDBOX/outfit-development';
const logGroup = 'sns/us-east-1/093525834944/app/APNS_SANDBOX/outfit-development';

it('should generate right log group', () => {
assert.deepEqual(awsUtils.getLogGroup(arn), logGroup);
});

});

});
3 changes: 1 addition & 2 deletions test/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: '2'
services:
app:
container_name: app
build:
context: ../../
dockerfile: ./test/docker/Dockerfile
Expand All @@ -10,5 +11,3 @@ services:
DATABASE_URL: "mongodb://mongo:27017/pingeon"
mongo:
image: "mvertes/alpine-mongo"
logging:
driver: none
20 changes: 8 additions & 12 deletions test/docker/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#!/bin/bash

# If script wasn't run in Jenkins set default tag
if [ -z "$BUILD_TAG" ]
then
BUILD_TAG="test-1"
fi

# Prepare project and container names for proper status check
PROJECT=`echo $BUILD_TAG | sed "s/\-//g"`
CONTAINER=$PROJECT"_app_1"
set -e

# Build environment and run ci scripts
docker-compose -f test/docker/docker-compose.yml -p $PROJECT up --abort-on-container-exit --build
docker-compose -f test/docker/docker-compose.yml up -d --build

# See the output from the scripts
docker attach app

# Status check
exit $(docker wait $CONTAINER)
# Clean everything up
docker-compose -f test/docker/docker-compose.yml kill
docker-compose -f test/docker/docker-compose.yml rm -f

0 comments on commit 3fe4d68

Please sign in to comment.