-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix/1079 Extensions Longer Than 128 Chars (#157)
* truncateExtensions setting * Add ALS DB script. Repair unit test with unmocked DB connection, causing issues
- Loading branch information
Showing
7 changed files
with
201 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"reject": [ | ||
|
||
"hapi-swagger" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
echo "---------------------------------------------------------------------" | ||
echo " Adding ALS database and user to existing ${DB_ID} Instance" | ||
echo "---------------------------------------------------------------------" | ||
|
||
CWD="${0%/*}" | ||
|
||
if [[ "$CWD" =~ ^(.*)\.sh$ ]]; | ||
then | ||
CWD="." | ||
fi | ||
|
||
echo "Loading env vars..." | ||
source $CWD/env.sh | ||
|
||
docker stop $DB_ID | ||
echo "Starting container ${DB_ID}" | ||
docker start $DB_ID | ||
exit_code=$? | ||
|
||
if [ "$exit_code" = "0" ] | ||
then | ||
docker exec -it ${DB_ID} mysql -uroot -e "DROP SCHEMA IF EXISTS account_lookup;" | ||
docker exec -it ${DB_ID} mysql -uroot -e "CREATE SCHEMA account_lookup;" | ||
docker exec -it ${DB_ID} mysql -uroot -e "DROP USER IF EXISTS account_lookup@'%';" | ||
docker exec -it ${DB_ID} mysql -uroot -e "CREATE USER account_lookup@'%' IDENTIFIED WITH mysql_native_password BY '$DBPASS';" | ||
docker exec -it ${DB_ID} mysql -uroot -e "GRANT ALL PRIVILEGES ON account_lookup.* TO 'account_lookup'@'%';" | ||
docker exec -it ${DB_ID} mysql -uroot -e "FLUSH PRIVILEGES;" | ||
else | ||
>&2 echo "{$DB_ID} container does not exist " | ||
fi | ||
|
||
echo "${DB_ID} ALS database ready to accept requests..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
export MOCKSERVER_ID=mockserver | ||
]export SLEEP_FACTOR_IN_SECONDS=5 | ||
export SLEEP_FACTOR_IN_SECONDS=5 | ||
export DB_ID=mysql | ||
export DBPASS=password |