mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-03 14:47:16 +00:00
test: add end-to-end testing framework (#5435)
Partial fix for #5291. For details, see [README.md](https://github.com/tendermint/tendermint/blob/erik/e2e-tests/test/e2e/README.md) and [RFC-001](https://github.com/tendermint/tendermint/blob/master/docs/rfc/rfc-001-end-to-end-testing.md). This only includes a single test case under `test/e2e/tests/`, as a proof of concept - additional test cases will be submitted separately. A randomized testnet generator will also be submitted separately, there a currently just a handful of static testnets under `test/e2e/networks/`. This will eventually replace the current P2P tests and run in CI.
This commit is contained in:
committed by
Erik Grinaker
parent
1b733ea28d
commit
a58454e788
@@ -0,0 +1,32 @@
|
||||
# We need to build in a Linux environment to support C libraries, e.g. RocksDB.
|
||||
# We use Debian instead of Alpine, so that we can use binary database packages
|
||||
# instead of spending time compiling them.
|
||||
FROM golang:1.15
|
||||
|
||||
RUN apt-get update -y && apt-get upgrade -y
|
||||
RUN apt-get install -y libleveldb-dev librocksdb-dev
|
||||
|
||||
# Set up build directory /src/tendermint
|
||||
ENV TENDERMINT_BUILD_OPTIONS badgerdb,boltdb,cleveldb,rocksdb
|
||||
WORKDIR /src/tendermint
|
||||
|
||||
# Fetch dependencies separately (for layer caching)
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Build Tendermint and install into /usr/bin/tendermint
|
||||
COPY . .
|
||||
RUN make build && cp build/tendermint /usr/bin/tendermint
|
||||
COPY test/e2e/docker/entrypoint* /usr/bin/
|
||||
RUN cd test/e2e && make app && cp build/app /usr/bin/app
|
||||
|
||||
# Set up runtime directory. We don't use a separate runtime image since we need
|
||||
# e.g. leveldb and rocksdb which are already installed in the build image.
|
||||
WORKDIR /tendermint
|
||||
VOLUME /tendermint
|
||||
ENV TMHOME=/tendermint
|
||||
|
||||
EXPOSE 26656 26657 26660
|
||||
ENTRYPOINT ["/usr/bin/entrypoint"]
|
||||
CMD ["node"]
|
||||
STOPSIGNAL SIGTERM
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Forcibly remove any stray UNIX sockets left behind from previous runs
|
||||
rm -rf /var/run/privval.sock /var/run/app.sock
|
||||
|
||||
/usr/bin/app /tendermint/config/app.toml &
|
||||
|
||||
sleep 1
|
||||
|
||||
/usr/bin/tendermint "$@"
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Forcibly remove any stray UNIX sockets left behind from previous runs
|
||||
rm -rf /var/run/privval.sock /var/run/app.sock
|
||||
|
||||
/usr/bin/app /tendermint/config/app.toml
|
||||
Reference in New Issue
Block a user