-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor integration test setup (#462)
* refactor integration tests Refactor integrations tests to build a docker image with the specified configurations locally rather than relying on a remote docker image * fix akash test * remove unnecessary comments * Update Makefile Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
- Loading branch information
1 parent
87cef08
commit 58174f4
Showing
8 changed files
with
119 additions
and
25 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
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,14 @@ | ||
# https://hub.docker.com/r/ovrclk/akash/tags?page=1&ordering=last_updated | ||
FROM ovrclk/akash:0.10.0 | ||
|
||
# Set up dependencies | ||
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
|
||
USER root | ||
|
||
COPY ./akash-setup.sh . | ||
|
||
EXPOSE 26657 | ||
|
||
ENTRYPOINT [ "./akash-setup.sh" ] | ||
# NOTE: to run this image, docker run -d -p 26657:26657 ./single-node.sh {{chain_id}} {{genesis_account}} |
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,20 @@ | ||
FROM tendermint/gaia:v4.1.0 | ||
|
||
# Set up dependencies | ||
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
|
||
USER root | ||
|
||
# Install minimum necessary dependencies, build Cosmos SDK, remove packages | ||
RUN apk add --no-cache $PACKAGES | ||
|
||
USER gaia | ||
|
||
WORKDIR /gaia | ||
|
||
COPY ./gaia-setup.sh . | ||
|
||
EXPOSE 26657 | ||
|
||
ENTRYPOINT [ "./gaia-setup.sh" ] | ||
# NOTE: to run this image, docker run -d -p 26657:26657 ./single-node.sh {{chain_id}} {{genesis_account}} |
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,35 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit -o nounset | ||
|
||
CHAINID=$1 | ||
GENACCT=$2 | ||
|
||
if [ -z "$1" ]; then | ||
echo "Need to input chain id..." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$2" ]; then | ||
echo "Need to input genesis account address..." | ||
exit 1 | ||
fi | ||
|
||
# Build genesis file incl account for passed address | ||
coins="10000000000stake,100000000000samoleans" | ||
akash init --chain-id $CHAINID $CHAINID | ||
akash keys add validator --keyring-backend="test" | ||
akash add-genesis-account $(akash keys show validator -a --keyring-backend="test") $coins | ||
akash add-genesis-account $GENACCT $coins | ||
akash gentx validator 5000000000stake --keyring-backend="test" --chain-id $CHAINID | ||
akash collect-gentxs | ||
|
||
# Set proper defaults and change ports | ||
sed -i 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' ~/.akash/config/config.toml | ||
sed -i 's/timeout_commit = "5s"/timeout_commit = "1s"/g' ~/.akash/config/config.toml | ||
sed -i 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ~/.akash/config/config.toml | ||
sed -i 's/index_all_keys = false/index_all_keys = true/g' ~/.akash/config/config.toml | ||
|
||
# Start the akash | ||
akash start --pruning=nothing | ||
|
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,35 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit -o nounset | ||
|
||
CHAINID=$1 | ||
GENACCT=$2 | ||
|
||
if [ -z "$1" ]; then | ||
echo "Need to input chain id..." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$2" ]; then | ||
echo "Need to input genesis account address..." | ||
exit 1 | ||
fi | ||
|
||
# Build genesis file incl account for passed address | ||
coins="10000000000stake,100000000000samoleans" | ||
gaiad init --chain-id $CHAINID $CHAINID | ||
gaiad keys add validator --keyring-backend="test" | ||
gaiad add-genesis-account $(gaiad keys show validator -a --keyring-backend="test") $coins | ||
gaiad add-genesis-account $GENACCT $coins | ||
gaiad gentx validator 5000000000stake --keyring-backend="test" --chain-id $CHAINID | ||
gaiad collect-gentxs | ||
|
||
# Set proper defaults and change ports | ||
sed -i 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' ~/.gaia/config/config.toml | ||
sed -i 's/timeout_commit = "5s"/timeout_commit = "1s"/g' ~/.gaia/config/config.toml | ||
sed -i 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ~/.gaia/config/config.toml | ||
sed -i 's/index_all_keys = false/index_all_keys = true/g' ~/.gaia/config/config.toml | ||
|
||
# Start the gaia | ||
gaiad start --pruning=nothing | ||
|
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