Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pytests/iroha_cli_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@ allure serve allure-results
```

The `allure-results` argument specifies the directory where the report is stored. After running this command, you will be able to view the report in your web browser by navigating to `http://localhost:port`, where `port` is the port number displayed in the terminal output.

## Nix tool

See [../../scripts/pytests.nix]
4 changes: 4 additions & 0 deletions pytests/iroha_torii_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ To run the automated tests, use the following command:
```bash
poetry run pytest
```

## Nix tool

See [../../scripts/pytests.nix]
45 changes: 45 additions & 0 deletions scripts/pytests.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is for development convenience, to make setting up and running pytests straightforward.
# This is not a final product, so feel free to edit manually to adjust tests running or do whatever is convenient
# for you right now.
#
# Build binaries: `cargo build --release --bins`
# Run from the repo root: `nix-shell ./scripts/pytests.nix`
# That's it
with import <nixpkgs> {};
pkgs.mkShell {
buildInputs = [
poetry
python313Packages.tomli-w

cowsay
];

BIN_IROHAD = "target/release/irohad";
BIN_IROHA = "target/release/iroha";
BIN_KAGAMI = "target/release/kagami";

TMP_DIR = "../../test";
IROHA_CLI_BINARY = "iroha";
IROHA_CLI_CONFIG = "client.toml";

shellHook = ''
./scripts/test_env.py setup
echo "Set up test env"

cd pytests/iroha_cli_tests
poetry install --no-root
poetry run pytest

cd ../iroha_torii_tests
poetry install --no-root
poetry run pytest

cd ../../

./scripts/test_env.py cleanup
echo "Cleaned up"

cowsay "Done!"
exit
'';
}
Loading