This repository was archived by the owner on Dec 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22target
33Cargo.lock
44devenv /*
5+ ! devenv /tests /docker /entrypoint
56coverage
67romeo /testing /
78romeo /asset-contract /.test
89romeo /asset-contract /.coverage
9-
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ docker compose -f docker-compose.yml build
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ if [ -z " $2 " ]; then
4+ echo " Use: down <full-node-compose.yml> <project_name>"
5+ exit 1
6+ fi
7+
8+ docker compose -f $1 -p $2 down
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -ueo > /dev/null
3+
4+ project_name () {
5+ local input=" $1 "
6+ local filter=" ${input// [![:alnum:]]/ _} "
7+ echo " $filter "
8+ }
9+
10+ filters=(" package(romeo)" " test(deposit_parse)" " test(deposit_output)" )
11+ filter_union=" "
12+ ids=()
13+ projects=()
14+
15+ for filter in " ${filters[@]} " ; do
16+ project=$( project_name $filter )
17+ echo Working project: $project
18+ projects+=($project )
19+
20+ ./tests/bin/down docker-compose.yml $project
21+ ./tests/bin/up docker-compose.yml $project
22+
23+ network=${project} _default
24+ id=$( docker run -td --network $network -e PROJECT_NAME=$project testbed " $filter " )
25+ ids+=($id )
26+ echo with container id: $id
27+
28+ if [ -z " $filter_union " ]; then
29+ filter_union=$filter
30+ else
31+ filter_union=" $filter_union | $filter "
32+ fi
33+
34+ done
35+
36+ project=" remainder--"
37+ echo Working project: $project
38+ projects+=($project )
39+
40+ ./tests/bin/down docker-compose.yml $project
41+ ./tests/bin/up docker-compose.yml $project
42+
43+ network=${project} _default
44+ id=($( docker run -td --network $network -e PROJECT_NAME=$project testbed " not ($filter_union )" ) )
45+ ids+=($id )
46+ echo with container id: $id
47+
48+ for id in ${ids[@]} ; do
49+ exit_code=$( docker wait $id )
50+ echo Runner: $id exited with err_no: $exit_code
51+ if [ $exit_code -ne 0 ]; then
52+ docker logs -f $id
53+ exit $exit_code
54+ fi
55+ done
56+
57+ for project in ${projects[@]} ; do
58+ ./tests/bin/down docker-compose.yml $project
59+ done
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ if [ -z " $2 " ]; then
4+ echo " Use: up <full-node-compose.yml> <project_name>"
5+ exit 1
6+ fi
7+
8+ docker compose -f $1 -p $2 up -d --remove-orphans
Original file line number Diff line number Diff line change 1+ version : ' 3.2'
2+
3+ networks :
4+ devenv_default :
5+ external : true
6+
7+ services :
8+ testbed :
9+ image : testbed:latest
10+ build :
11+ dockerfile : devenv/tests/docker/Dockerfile
12+ context : ./../../
13+ networks :
14+ - devenv_default
Original file line number Diff line number Diff line change 1+ FROM rust:alpine
2+
3+ RUN apk add --no-cache g++ musl-dev git openssl-dev clang-dev libsecp256k1-dev
4+
5+ RUN rustup component add rustfmt
6+
7+ ENV RUSTFLAGS "-C target-feature=-crt-static"
8+
9+ RUN cargo install cargo-nextest --locked
10+
11+ COPY . .
12+
13+ RUN cargo nextest list
14+
15+ RUN apk --no-cache add curl jq
16+
17+ COPY ./devenv/tests/docker/entrypoint /bin/entrypoint
18+
19+ ENTRYPOINT [ "entrypoint" ]
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ set -ueo > /dev/null
3+
4+ STACKS=$PROJECT_NAME -stacks-1
5+ API_URL=http://$STACKS :20443/v2/info
6+
7+ # makes sure the node is ready before proceeding
8+ # stacks node get info
9+ echo " Waiting on Stacks API"
10+ while ! curl -s $API_URL > /dev/null; do
11+ sleep 1
12+ done
13+
14+ DEV_READY_HEIGHT=205
15+
16+ # bitcoind get info
17+ echo " Waiting on burn block height $DEV_READY_HEIGHT "
18+ while [ " $( curl -s $API_URL | jq ' .burn_block_height' ) " -lt $DEV_READY_HEIGHT ]; do
19+ sleep 2
20+ done
21+ # any other service checks
22+
23+ echo with filter: " '$@ '"
24+ cargo nextest run -E " $@ "
You can’t perform that action at this time.
0 commit comments