-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Estabilizes tests and also tracks untracked tables
- Loading branch information
1 parent
bf9f633
commit 99f9959
Showing
18 changed files
with
232 additions
and
268 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 |
---|---|---|
|
@@ -66,5 +66,5 @@ test-output/ | |
*.tap | ||
|
||
# Karate reports | ||
tests/target/ | ||
target/ | ||
tests/results/ |
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,18 +1,14 @@ | ||
# Use a lightweight Linux base image | ||
FROM debian:bullseye-slim | ||
FROM debian:buster-slim | ||
|
||
# Set environment variables for non-interactive installations | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update -y && apt-get install -y curl socat | ||
# RUN curl -L -o /usr/local/bin/hasura | ||
RUN curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash | ||
RUN chmod +x /usr/local/bin/hasura | ||
|
||
# Install necessary dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
curl \ | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR /app | ||
|
||
# Download and install Hasura CLI | ||
RUN curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash | ||
COPY . . | ||
|
||
RUN chmod +x ./start.sh | ||
|
||
# Set the default command to show Hasura CLI help | ||
CMD ["hasura", "console"] | ||
CMD "./start.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
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,4 @@ | ||
|
||
#!/bin/bash | ||
|
||
docker compose up console --build |
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,3 @@ | ||
#!/bin/bash | ||
|
||
docker compose up -d graphql-engine |
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,9 +1,9 @@ | ||
version: 3 | ||
endpoint: http://localhost:8080 | ||
endpoint: http://host.docker.internal:8080 | ||
admin_secret: myadminsecretkey | ||
metadata_directory: metadata | ||
migrations_directory: migrations | ||
seeds_directory: seeds | ||
actions: | ||
kind: synchronous | ||
handler_webhook_baseurl: http://localhost:3000 | ||
handler_webhook_baseurl: http://host.docker.internal:3000 |
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
14 changes: 14 additions & 0 deletions
14
metadata/databases/safetrust/tables/public_apartments.yaml
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,14 @@ | ||
table: | ||
name: apartments | ||
schema: public | ||
configuration: | ||
custom_root_fields: {} | ||
custom_column_names: {} | ||
array_relationships: | ||
- name: users | ||
using: | ||
foreign_key_constraint_on: | ||
column: owner_id | ||
table: | ||
schema: public | ||
name: users |
14 changes: 14 additions & 0 deletions
14
metadata/databases/safetrust/tables/public_bid_requests.yaml
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,14 @@ | ||
table: | ||
schema: public | ||
name: bid_requests | ||
configuration: | ||
custom_root_fields: {} | ||
custom_column_names: {} | ||
array_relationships: | ||
- name: status_histories | ||
using: | ||
foreign_key_constraint_on: | ||
column: bid_request_id | ||
table: | ||
schema: public | ||
name: bid_status_histories |
7 changes: 7 additions & 0 deletions
7
metadata/databases/safetrust/tables/public_bid_status_histories.yaml
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 @@ | ||
table: | ||
schema: public | ||
name: bid_status_histories | ||
object_relationships: | ||
- name: bid_request | ||
using: | ||
foreign_key_constraint_on: bid_request_id |
25 changes: 0 additions & 25 deletions
25
metadata/databases/safetrust/tables/public_bid_tables.yaml
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
- "!include public_geography_columns.yaml" | ||
- "!include public_geometry_columns.yaml" | ||
- "!include public_spatial_ref_sys.yaml" | ||
- "!include public_user_wallets.yaml" | ||
- "!include public_users.yaml" | ||
- "!include escrow_api_calls.yaml" | ||
- "!include escrow_transactions.yaml" | ||
- "!include escrow_xdr_transactions.yaml" | ||
- "!include public_apartments.yaml" | ||
- "!include public_apartment_images.yaml" | ||
- "!include public_bid_tables.yaml" | ||
- '!include public_geography_columns.yaml' | ||
- '!include public_geometry_columns.yaml' | ||
- '!include public_spatial_ref_sys.yaml' | ||
- '!include public_user_wallets.yaml' | ||
- '!include public_users.yaml' | ||
- '!include escrow_api_calls.yaml' | ||
- '!include escrow_transactions.yaml' | ||
- '!include escrow_xdr_transactions.yaml' | ||
- '!include public_apartments.yaml' | ||
- '!include public_apartment_images.yaml' | ||
- '!include public_bid_requests.yaml' | ||
- '!include public_bid_status_histories.yaml' | ||
|
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,28 @@ | ||
#!/bin/bash | ||
|
||
HASURA_FOLDER=/app | ||
cd $HASURA_FOLDER || { | ||
echo "Hasura folder '$HASURA_FOLDER' not found" | ||
exit 1 | ||
} | ||
|
||
# Workaround for https://github.com/hasura/graphql-engine/issues/2824#issuecomment-801293056 | ||
socat TCP-LISTEN:8080,fork TCP:graphql-engine:8080 & | ||
socat TCP-LISTEN:9695,fork,reuseaddr,bind=console TCP:127.0.0.1:9695 & | ||
socat TCP-LISTEN:9693,fork,reuseaddr,bind=console TCP:127.0.0.1:9693 & | ||
{ | ||
# Apply migrations | ||
hasura migrate apply --database-name=safetrust || exit 1 | ||
|
||
# Apply metadata changes | ||
hasura metadata apply || exit 1 | ||
|
||
# Run console if specified | ||
if [[ -v HASURA_RUN_CONSOLE ]]; then | ||
echo "Starting console..." | ||
hasura console --log-level DEBUG --address "127.0.0.1" --no-browser || exit 1 | ||
else | ||
echo "Started without console" | ||
tail -f /dev/null | ||
fi | ||
} |
Oops, something went wrong.