-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from manuelmauro/integration-tests
Configure Algorand SDKs tests + implement applications feature
- Loading branch information
Showing
20 changed files
with
622 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ Cargo.lock | |
/test.sh | ||
signed.tx | ||
**/.env | ||
|
||
# ignore cucumber test resources | ||
test-harness/ | ||
tests/features/ |
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,5 @@ | ||
integration: | ||
cargo test --test features_runner -- | ||
|
||
docker-test: | ||
./tests/docker/run_docker.sh |
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
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
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
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,13 @@ | ||
# ARG GO_IMAGE=golang:1.13-stretch | ||
# FROM $GO_IMAGE | ||
FROM rust:1.57.0 | ||
RUN apt-get update && apt-get install -y make | ||
|
||
# Copy SDK code into the container | ||
RUN mkdir -p $HOME/algonaut | ||
COPY . $HOME/algonaut | ||
WORKDIR $HOME/algonaut | ||
|
||
# Run integration tests | ||
# CMD ["/bin/bash", "-c", "make unit && make integration"] | ||
CMD ["/bin/bash", "-c", "make integration"] |
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,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# reset test harness | ||
rm -rf test-harness | ||
rm -rf tests/features | ||
# fork with modified features, as cucumber-rs doesn't understand some syntax: | ||
# https://github.com/cucumber-rs/cucumber/issues/174 | ||
# https://github.com/cucumber-rs/cucumber/issues/175 | ||
# git clone --single-branch --branch master https://github.com/algorand/algorand-sdk-testing.git test-harness | ||
git clone --single-branch --branch master https://github.com/ivanschuetz/algorand-sdk-testing.git test-harness | ||
# copy feature files into project | ||
mv test-harness/features tests/features | ||
|
||
RUST_IMAGE=rust:1.57.0 | ||
|
||
echo "Building docker image from base \"$RUST_IMAGE\"" | ||
|
||
#build test environment | ||
docker build -t rust-sdk-testing -f tests/docker/Dockerfile "$(pwd)" | ||
|
||
# Start test harness environment | ||
./test-harness/scripts/up.sh -p | ||
|
||
docker run --network host rust-sdk-testing:latest |
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,25 @@ | ||
use cucumber::WorldInit; | ||
use step_defs::integration; | ||
|
||
mod step_defs; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
// NOTE: we don't support algod v1 anymore | ||
// features which depend completely on algod v1 are omitted | ||
|
||
// algod feature: omitted (algod v1) | ||
|
||
// TODO abi feature: ABI not supported yet | ||
|
||
integration::applications::World::cucumber() | ||
.max_concurrent_scenarios(1) | ||
.run(integration_path("applications")) | ||
.await; | ||
|
||
// assets feature: omitted (algod v1) | ||
} | ||
|
||
fn integration_path(feature_name: &str) -> String { | ||
format!("tests/features/integration/{}.feature", feature_name) | ||
} |
Oops, something went wrong.