-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor test and use feature flag for e2e-tests
- Loading branch information
Showing
5 changed files
with
69 additions
and
62 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,48 @@ | ||
use assert_cmd::Command; | ||
|
||
fn get_base_cmd() -> Command { | ||
let mut cmd = Command::cargo_bin("soroban").unwrap(); | ||
cmd.env("SOROBAN_RPC_URL", "http://localhost:8000/soroban/rpc") | ||
.env( | ||
"SOROBAN_SECRET_KEY", | ||
"SC5O7VZUXDJ6JBDSZ74DSERXL7W3Y5LTOAMRF7RQRL3TAGAPS7LUVG3L", | ||
) | ||
.env( | ||
"SOROBAN_NETWORK_PASSPHRASE", | ||
"Standalone Network ; February 2017", | ||
); | ||
cmd | ||
} | ||
|
||
#[test] | ||
#[cfg_attr(not(feature = "e2e_tests"), ignore)] | ||
fn deploy_and_invoke_contract_against_rpc_server() { | ||
// This test assumes a fresh standalone network rpc server on port 8000 | ||
|
||
let mut deploy = get_base_cmd(); | ||
let deploy = deploy.args(&[ | ||
"deploy", | ||
"--wasm=tests/fixtures/soroban_hello_world_contract.wasm", | ||
"--salt=0", | ||
]); | ||
|
||
deploy | ||
.assert() | ||
.stdout("1f3eb7b8dc051d6aa46db5454588a142c671a0cdcdb36a2f754d9675a64bf613\n") | ||
.stderr("success\n") | ||
.success(); | ||
|
||
let mut invoke = get_base_cmd(); | ||
let invoke = invoke.args(&[ | ||
"invoke", | ||
"--id=1f3eb7b8dc051d6aa46db5454588a142c671a0cdcdb36a2f754d9675a64bf613", | ||
"--fn=hello", | ||
"--arg=world", | ||
]); | ||
|
||
invoke | ||
.assert() | ||
.stdout("[\"Hello\",\"world\"]\n") | ||
.stderr("success\n") | ||
.success(); | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.