Skip to content

Commit 095c96b

Browse files
authored
Merge pull request #16337 from MinaProtocol/dkijania/port_archive_unit_test_setup_fix_to_master
Fix nightly by porting compatible fix for ArchiveNodeUnitTests.dhall
2 parents 128660e + 0e03111 commit 095c96b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
#!/bin/bash
1+
#!/bin/bash
22

33
set -euo pipefail
44

55
user=$1
66
password=$2
77
db=$3
8+
port=$4
89

910

1011
sudo service postgresql start
1112
sudo -u postgres psql -c "CREATE USER ${user} WITH LOGIN SUPERUSER PASSWORD '${password}';"
1213
sudo pg_isready
1314
service postgresql status
1415
sudo -u postgres createdb -O $user $db
15-
PGPASSWORD=$password psql -h localhost -p 5434 -U $user -d $db -a -f src/app/archive/create_schema.sql
16+
PGPASSWORD=$password psql -h localhost -p $port -U $user -d $db -a -f src/app/archive/create_schema.sql

buildkite/src/Jobs/Test/ArchiveNodeUnitTest.dhall

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ let password = "codarules"
2424

2525
let db = "archiver"
2626

27+
let port = "5433"
28+
2729
let command_key = "archive-unit-tests"
2830

2931
in Pipeline.build
@@ -50,14 +52,14 @@ in Pipeline.build
5052
[ "POSTGRES_PASSWORD=${password}"
5153
, "POSTGRES_USER=${user}"
5254
, "POSTGRES_DB=${db}"
53-
, "MINA_TEST_POSTGRES=postgres://${user}:${password}@localhost:5434/${db}"
55+
, "MINA_TEST_POSTGRES=postgres://${user}:${password}@localhost:${port}/${db}"
5456
, "GO=/usr/lib/go/bin/go"
5557
, "DUNE_INSTRUMENT_WITH=bisect_ppx"
5658
, "COVERALLS_TOKEN"
5759
]
5860
( Prelude.Text.concatSep
5961
" && "
60-
[ "bash buildkite/scripts/setup-database-for-archive-node.sh ${user} ${password} ${db}"
62+
[ "bash buildkite/scripts/setup-database-for-archive-node.sh ${user} ${password} ${db} ${port}"
6163
, WithCargo.withCargo
6264
"eval \\\$(opam config env) && dune runtest src/app/archive && buildkite/scripts/upload-partial-coverage-data.sh ${command_key} dev"
6365
]

0 commit comments

Comments
 (0)