Skip to content

Commit

Permalink
test(cat-gateway): restore schemathesis tests (#1434)
Browse files Browse the repository at this point in the history
* wip

* wip

* wip

* wip

* wip

* wip

* fix: remove scylla earthfile

* feat: runs schemathesis only on api/started endpoint

* clean up

* fix: blueprint

* fix: blueprint

* fix: blueprint

* fix: blueprint

* fix: remove hooks

* fix: remove some checks

---------

Co-authored-by: Steven Johnson <[email protected]>
  • Loading branch information
kukkok3 and stevenj authored Jan 8, 2025
1 parent d38f9f1 commit 4908eeb
Show file tree
Hide file tree
Showing 5 changed files with 689 additions and 38 deletions.
56 changes: 39 additions & 17 deletions catalyst-gateway/tests/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,45 @@ VERSION 0.8
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.2.27 AS spectral-ci
IMPORT .. AS gateway

# INSTALL_SCYLLA - Installs scylla for bookworm-slim/debian
INSTALL_SCYLLA:
FUNCTION

ARG --required VERSION

RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget gnupg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/scylladb.gpg \
--keyserver hkp://keyserver.ubuntu.com:80 --recv-keys a43e06657bac99e3 && \
wget -O /etc/apt/sources.list.d/scylla.list http://downloads.scylladb.com/deb/debian/scylla-$VERSION.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
scylla

package-cat-gateway-integration:
FROM python:3.14.0a3-slim-bookworm
ENV LOG_LEVEL=error
ENV DATA_REFRESH_TICK=5
ENV CHECK_CONFIG_TICK=5
ENV MACHINE_ID="UID"
ENV CHAIN_FOLLOWER_SYNC_TASKS="16"
ENV RUST_LOG="error,cat_gateway=debug,cardano_chain_follower=debug,mithril-client=debug"
ENV CHAIN_NETWORK="Preprod"
ENV CAT_ADDRESS=0.0.0.0:3030
ENV INTERNAL_API_KEY=123
ENV EVENT_DB_URL "postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev"

DO +INSTALL_SCYLLA --VERSION=6.2

COPY node1-scylla.yaml /etc/scylla/scylla.yaml
COPY ../+build/cat-gateway .
# https://github.com/scylladb/scylladb/issues/3142
ENTRYPOINT ( scylla --options-file /etc/scylla/scylla.yaml --developer-mode 1 --default-log-level error & ) && \
./cat-gateway run
SAVE IMAGE cat-gateway-integration:latest

# cspell: words oapi
# test-lint-openapi - OpenAPI linting from an artifact
# testing whether the OpenAPI generated during build stage follows good practice.
Expand Down Expand Up @@ -42,20 +81,3 @@ test-scylla:
RUN --mount=$EARTHLY_RUST_CARGO_HOME_CACHE --mount=$EARTHLY_RUST_TARGET_CACHE \
scylla --options-file /etc/scylla/scylla.yaml --smp=2 --memory=4G --overprovisioned --developer-mode=1 & \
cargo nextest run --release --run-ignored=only scylla_session scylla_queries

# INSTALL_SCYLLA - Installs scylla for bookworm-slim/debian
INSTALL_SCYLLA:
FUNCTION

ARG --required VERSION

RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget gnupg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/scylladb.gpg \
--keyserver hkp://keyserver.ubuntu.com:80 --recv-keys a43e06657bac99e3 && \
wget -O /etc/apt/sources.list.d/scylla.list http://downloads.scylladb.com/deb/debian/scylla-$VERSION.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
scylla
Loading

0 comments on commit 4908eeb

Please sign in to comment.