-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed mysql integration tests for #5
- Loading branch information
Jaakko Heusala
committed
Sep 8, 2024
1 parent
9011c36
commit b905ef7
Showing
16 changed files
with
82 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
|
||
CONTAINER_NAME_OR_ID="$1" | ||
if test "x$CONTAINER_NAME_OR_ID" = x; then | ||
echo 'USAGE: ./scripts/is-docker-container-running.sh NAME' >&2 | ||
exit 2 | ||
fi | ||
|
||
# Check if the container is running | ||
if [ "$(docker ps -q -f name="$CONTAINER_NAME_OR_ID")" ]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
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,6 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
docker run -i --rm mysql:8 mysql -uhg -hhost.docker.internal -prxPe4XHbonLeHwjvKdq9R9aDWf1xiUje hg < ./src/fi/hg/mysql/docker/initial.sql | ||
docker run -i --rm mysql:8 mysql -uhg -hhost.docker.internal -prxPe4XHbonLeHwjvKdq9R9aDWf1xiUje hg < ./src/io/hyperify/mysql/docker/initial.sql |
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,6 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
docker run -i --rm postgres:15 psql 'postgresql://hg:rxPe4XHbonLeHwjvKdq9R9aDWf1xiUje@host.docker.internal/hg' < ./src/fi/hg/pg/docker/initial.sql | ||
docker run -i --rm postgres:15 psql 'postgresql://hg:rxPe4XHbonLeHwjvKdq9R9aDWf1xiUje@host.docker.internal/hg' < ./src/io/hyperify/pg/docker/initial.sql |
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,4 +1,5 @@ | ||
#!/bin/bash | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
|
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,6 +1,7 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
npm run clear | ||
TEST_SCOPES=integration,hg npm run test:ci -- 'MemoryRepositoryIntegration.test.ts' "$@" | ||
TEST_SCOPES=integration,unit npm run test:ci -- 'MemoryRepositoryIntegration.test.ts' "$@" |
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,6 +1,25 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -x | ||
set -e | ||
|
||
if ./scripts/is-docker-container-running.sh io-hyperify-mysql-server; then | ||
echo 'Test server was already running' >&2 | ||
exit 2 | ||
fi | ||
|
||
set -x | ||
npm run clear | ||
TEST_MYSQL_PASSWORD='rxPe4XHbonLeHwjvKdq9R9aDWf1xiUje' TEST_SCOPES=integration,hg npm run test:ci -- "$@" MySqlRepositoryIntegration.test.ts | ||
./scripts/start-integration-test-server-mysql.sh | ||
|
||
cleanup() { | ||
if ./scripts/is-docker-container-running.sh io-hyperify-mysql-server; then | ||
./scripts/stop-integration-test-server-mysql.sh | ||
fi | ||
} | ||
trap cleanup EXIT | ||
|
||
./scripts/reset-integration-test-mysql.sh | ||
TEST_MYSQL_PASSWORD='rxPe4XHbonLeHwjvKdq9R9aDWf1xiUje' TEST_SCOPES=integration,unit npm run test:ci -- "$@" MySqlRepositoryIntegration.test.ts | ||
if ./scripts/is-docker-container-running.sh io-hyperify-mysql-server; then | ||
./scripts/stop-integration-test-server-mysql.sh | ||
fi |
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,6 +1,15 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -x | ||
set -e | ||
|
||
if ./is-docker-container-running.sh io-hyperify-pg-server; then | ||
echo 'Test server was already running' >&2 | ||
exit 2 | ||
fi | ||
|
||
set -x | ||
npm run clear | ||
TEST_POSTGRES_PASSWORD='rxPe4XHbonLeHwjvKdq9R9aDWf1xiUje' TEST_SCOPES=integration,hg npm run test:ci -- "$@" 'PgRepositoryIntegration.test.ts' | ||
./scripts/start-integration-test-server-pg.sh | ||
./scripts/reset-integration-test-pg.sh | ||
TEST_POSTGRES_PASSWORD='rxPe4XHbonLeHwjvKdq9R9aDWf1xiUje' TEST_SCOPES=integration,unit npm run test:ci -- "$@" 'PgRepositoryIntegration.test.ts' | ||
./scripts/stop-integration-test-server-pg.sh |
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,6 +1,8 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
cd src/fi/hg/mysql/docker/ | ||
docker-compose up --build | ||
cd src/io/hyperify/mysql/docker/ | ||
docker-compose up -d --build | ||
sleep 10 |
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,6 +1,8 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
cd src/fi/hg/pg/docker/ | ||
docker-compose up --build | ||
cd src/io/hyperify/pg/docker/ | ||
docker-compose up -d --build | ||
sleep 3 |
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,7 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
cd src/io/hyperify/mysql/docker/ | ||
exec docker-compose down |
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,7 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")/.." | ||
set -e | ||
set -x | ||
|
||
cd src/io/hyperify/pg/docker/ | ||
exec docker-compose down |
Submodule core
updated
83 files
Submodule frontend
updated
15 files
+5 −5 | README.md | |
+8 −1 | components/actionButton/HyperActionButton.tsx | |
+13 −1 | components/fields/text/TextField.scss | |
+3 −1 | components/fields/text/TextField.tsx | |
+2 −2 | components/submitButton/SubmitButton.tsx | |
+6 −3 | components/utils/ComponentUtils.tsx | |
+2 −0 | components/views/HyperView.tsx | |
+22 −0 | hooks/useDefaultLanguage.ts | |
+37 −0 | hooks/useI18nWithLanguageService.ts | |
+2 −1 | hooks/useScrollTop.ts | |
+26 −26 | hooks/useShoppingCartMenu.ts | |
+12 −2 | hooks/useStoreProductList.ts | |
+1 −0 | hooks/useWindow.ts | |
+246 −140 | renderers/HyperRendererImpl.tsx | |
+15 −0 | services/EmailAuthSessionService.ts |
Submodule node
updated
6 files
+6 −6 | README.md | |
+6 −6 | backend/README.md | |
+3 −3 | create/create/README.md | |
+6 −6 | ecb/README.md | |
+8 −8 | pipeline/README.md | |
+7 −7 | ssr/README.md |