Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rosetta] add test for mina-indexer #15641

Merged
merged 6 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildkite/scripts/build-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dune build "--profile=${DUNE_PROFILE}" $INSTRUMENTED_PARAM \
src/app/swap_bad_balances/swap_bad_balances.exe \
src/app/zkapp_test_transaction/zkapp_test_transaction.exe \
src/app/rosetta/rosetta_testnet_signatures.exe \
src/app/rosetta/indexer_test/indexer_test.exe \
src/app/rosetta/ocaml-signer/signer_testnet_signatures.exe \
src/app/test_executive/test_executive.exe \
src/test/command_line_tests/command_line_tests.exe # 2>&1 | tee /tmp/buildocaml.log
4 changes: 4 additions & 0 deletions buildkite/scripts/rosetta-indexer-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -eox pipefail

mina-rosetta-indexer-test --archive_uri $PG_CONN
4 changes: 2 additions & 2 deletions buildkite/src/Command/RunWithPostgres.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ let runInDockerWithPostgresConn
, "docker run --network host --volume ${outerDir}:/workdir --workdir /workdir --name ${postgresDockerName} -d -e POSTGRES_USER=${user} -e POSTGRES_PASSWORD=${password} -e POSTGRES_PASSWORD=${password} -e POSTGRES_DB=${dbName} ${dockerVersion}"
, "sleep 5"
, "docker exec ${postgresDockerName} psql ${pg_conn} -f /workdir/${initScript}"
, "docker run --network host --volume ${outerDir}:/workdir --workdir /workdir ${envVars} gcr.io/o1labs-192920/${Artifacts.dockerName
docker}:\\\$MINA_DOCKER_TAG ${innerScript}"
, "docker run --network host --volume ${outerDir}:/workdir --workdir /workdir --entrypoint bash ${envVars} gcr.io/o1labs-192920/${Artifacts.dockerName
docker}:\\\$MINA_DOCKER_TAG ${innerScript}"
]

in { runInDockerWithPostgresConn = runInDockerWithPostgresConn }
9 changes: 9 additions & 0 deletions buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ let Profiles = ../../Constants/Profiles.dhall

let Dockers = ../../Constants/DockerVersions.dhall

let Artifacts = ../../Constants/Artifacts.dhall

let RunWithPostgres = ../../Command/RunWithPostgres.dhall

let dirtyWhen =
[ S.strictlyStart (S.contains "src")
, S.exactly "buildkite/src/Jobs/Test/RosettaIntegrationTests" "dhall"
Expand Down Expand Up @@ -43,6 +47,11 @@ in Pipeline.build
"gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}"
}
"buildkite/scripts/rosetta-integration-tests-fast.sh"
, RunWithPostgres.runInDockerWithPostgresConn
([] : List Text)
"./src/test/archive/sample_db/archive_db.sql"
Artifacts.Type.Rosetta
"./buildkite/scripts/rosetta-indexer-test.sh"
]
, label = "Rosetta integration tests Bullseye"
, key = "rosetta-integration-tests-bullseye"
Expand Down
3 changes: 2 additions & 1 deletion scripts/deb-builder-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ copy_common_daemon_configs() {

cp ../src/app/rosetta/rosetta-cli-config/*.json "${BUILDDIR}/etc/mina/rosetta/rosetta-cli-config"
cp ../src/app/rosetta/rosetta-cli-config/*.ros "${BUILDDIR}/etc/mina/rosetta/rosetta-cli-config"
cp ./default/src/app/rosetta/indexer_test/indexer_test.exe "${BUILDDIR}/usr/local/bin/mina-rosetta-indexer-test"
cp ../src/app/archive/*.sql "${BUILDDIR}/etc/mina/rosetta/archive"
cp -r ../genesis_ledgers/* ${BUILDDIR}/etc/mina/rosetta/genesis_ledgers/

Expand Down Expand Up @@ -272,7 +273,7 @@ build_functional_test_suite_deb() {

# Binaries
cp ./default/src/test/command_line_tests/command_line_tests.exe "${BUILDDIR}/usr/local/bin/mina-command-line-tests"

build_deb mina-test-suite

}
Expand Down