Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove test command #958

Merged
merged 4 commits into from
Feb 8, 2023
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,4 @@ jobs:
cargo run --profile debug-ci -- contract new --target-dir ${{ runner.temp }} foobar &&
cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract check --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract test --manifest-path=${{ runner.temp }}/foobar/Cargo.toml &&
cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml --release
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Respect the lockfile [#948](https://github.com/paritytech/cargo-contract/pull/948)

### Removed
- Remove the `test` command [#958](https://github.com/paritytech/cargo-contract/pull/958)

## [2.0.0-rc.1] - 2023-02-01
Second release candidate compatible with `ink! 4.0.0-rc`.

Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ deploying the contract on-chain.
Checks that the code builds as WebAssembly. This command does not output any `<name>.contract`
artifact to the `target/` directory.

##### `cargo contract test`

Runs test suites defined for a smart contract off-chain.

##### `cargo contract upload`

Upload a contract to a `pallet-contracts` enabled chain. See [extrinsics](docs/extrinsics.md).
Expand Down
2 changes: 0 additions & 2 deletions crates/cargo-contract/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

pub mod build;
pub mod decode;
pub mod test;

pub(crate) use self::{
build::{
BuildCommand,
CheckCommand,
},
decode::DecodeCommand,
test::TestCommand,
};
mod extrinsics;

Expand Down
124 changes: 0 additions & 124 deletions crates/cargo-contract/src/cmd/test.rs

This file was deleted.

11 changes: 0 additions & 11 deletions crates/cargo-contract/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use self::cmd::{
DecodeCommand,
ErrorVariant,
InstantiateCommand,
TestCommand,
UploadCommand,
};
use contract_build::{
Expand Down Expand Up @@ -111,9 +110,6 @@ enum Command {
/// Check that the code builds as Wasm; does not output any `<name>.contract` artifact to the `target/` directory
#[clap(name = "check")]
Check(CheckCommand),
/// Test the smart contract off-chain
#[clap(name = "test")]
Test(TestCommand),
/// Upload contract code
#[clap(name = "upload")]
Upload(UploadCommand),
Expand Down Expand Up @@ -170,13 +166,6 @@ fn exec(cmd: Command) -> Result<()> {
}
Ok(())
}
Command::Test(test) => {
let res = test.exec().map_err(format_err)?;
if res.verbosity.is_verbose() {
println!("{}", res.display()?)
}
Ok(())
}
Command::Upload(upload) => {
upload
.run()
Expand Down