Skip to content

Commit

Permalink
Revert local testing, add note
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-stytch committed Sep 9, 2024
1 parent 065afa2 commit 0e36fed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions synth/testing_harness/mysql/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
Integration Tests for MySql
====================================

This is an integration test that validates the synth generate and synth import commands for MySql on a Debian flavored
This is an integration test that validates the synth generate and synth import commands for MySql on a Debian flavored
OS. The models in hospital_master are used as a known "golden" set to validate against. The *.sql scripts generate the
schema and test data within the database.

# Requirements:
## Note if running locally on Mac OS

`./e2e.sh` assumes the use of the GNU variant of `grep`, specifically in its use of `-P` for PCRE flavored regex.
You will need to run `brew install grep`, and then alter the script to use `ggrep` command instead of the built-in BSD `grep`.

# Requirements

- Docker
- jq

Expand Down
2 changes: 1 addition & 1 deletion synth/testing_harness/mysql/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function test-warning() {

docker exec -i $NAME $SCHEME -h 127.0.0.1 -u root --password=$PASSWORD -P 3306 "test_db" <"$folder/schema.sql"
output=$($SYNTH generate --size 10 --to mysql://root:${PASSWORD}@localhost:${PORT}/test_db "$folder" 2>&1)
warnings=$(echo "$output" | grep "WARN" | ggrep -Po "(?<=\]\s).*$")
warnings=$(echo "$output" | grep "WARN" | grep -Po "(?<=\]\s).*$")

if [ -z "$warnings" ]; then
echo -e "${ERROR}[$folder] did not produce any warnings${NC}"
Expand Down

0 comments on commit 0e36fed

Please sign in to comment.