diff --git a/integration_tests/features/NFT.feature b/integration_tests/features/NFT.feature index a4f0e42f7c..0e76dac85f 100644 --- a/integration_tests/features/NFT.feature +++ b/integration_tests/features/NFT.feature @@ -3,6 +3,8 @@ @dan Feature: NFT + + @broken Scenario: Minting tokens Given I have a seed node SEED And I have wallet WALLET_A connected to seed node SEED @@ -26,6 +28,7 @@ Feature: NFT Then I have token TOKEN1 for asset FACTORY on wallet WALLET_B in state ENCUMBEREDTOBERECEIVED Then I have asset FACTORY on wallet WALLET_A with status ENCUMBEREDTOBERECEIVED + @broken Scenario: Minting tokens via command line Given I have a seed node SEED And I have wallet WALLET_A connected to seed node SEED diff --git a/integration_tests/features/ValidatorNode.feature b/integration_tests/features/ValidatorNode.feature index 40b9e32737..85a7dfcfe8 100644 --- a/integration_tests/features/ValidatorNode.feature +++ b/integration_tests/features/ValidatorNode.feature @@ -3,12 +3,13 @@ @dan Feature: Validator Node + @broken Scenario: Test committee Given I have committee from 4 validator nodes connected Then I send instruction successfully with metadata {"issuer" : {"num_clicks" : 1}} Then At least 3 out of 4 validator nodes have filled asset data - @current + @current @broken Scenario: Start asset Given I have a seed node NODE1 And I have wallet WALLET1 connected to all seed nodes @@ -20,6 +21,7 @@ Feature: Validator Node And I create 40 NFTs And I mine 3 blocks + @broken Scenario: Publish contract acceptance Given I have a seed node NODE1 And I have wallet WALLET1 connected to all seed nodes diff --git a/integration_tests/features/WalletCli.feature b/integration_tests/features/WalletCli.feature index 3298988402..069bbee8e2 100644 --- a/integration_tests/features/WalletCli.feature +++ b/integration_tests/features/WalletCli.feature @@ -152,26 +152,26 @@ Feature: Wallet CLI And mining node MINE mines 1 blocks Then WALLET is connected to BASE - @dan_layer + @dan @critical Scenario: As a user I want to publish a contract definition via command line Given I have a base node BASE And I have wallet WALLET connected to base node BASE And I have mining node MINE connected to base node BASE and wallet WALLET And mining node MINE mines 4 blocks Then I wait for wallet WALLET to have at least 1000000 uT - And I create a "contract-definition" from file "fixtures/contract_definition.json" on wallet WALLET via command line - And mining node MINE mines 4 blocks + And I publish a contract definition from file "fixtures/contract_definition.json" on wallet WALLET via command line + And mining node MINE mines 8 blocks Then wallet WALLET has at least 1 transactions that are all TRANSACTION_STATUS_MINED_CONFIRMED and not cancelled Then WALLET is connected to BASE - @dan_layer - Scenario: As a user I want to publish a constitution definition via command line + @dan @critical + Scenario: As a user I want to publish a contract constitution via command line Given I have a base node BASE And I have wallet WALLET connected to base node BASE And I have mining node MINE connected to base node BASE and wallet WALLET And mining node MINE mines 4 blocks Then I wait for wallet WALLET to have at least 1000000 uT - And I create a "constitution-definition" from file "fixtures/constitution_definition.json" on wallet WALLET via command line - And mining node MINE mines 4 blocks + And I publish a contract constitution from file "fixtures/contract_constitution.json" on wallet WALLET via command line + And mining node MINE mines 8 blocks Then wallet WALLET has at least 1 transactions that are all TRANSACTION_STATUS_MINED_CONFIRMED and not cancelled Then WALLET is connected to BASE \ No newline at end of file diff --git a/integration_tests/features/support/wallet_cli_steps.js b/integration_tests/features/support/wallet_cli_steps.js index 7a01509194..e417f3b840 100644 --- a/integration_tests/features/support/wallet_cli_steps.js +++ b/integration_tests/features/support/wallet_cli_steps.js @@ -301,14 +301,29 @@ Then( ); Then( - "I create a {string} from file {string} on wallet {word} via command line", + "I publish a contract definition from file {string} on wallet {word} via command line", { timeout: 120 * 1000 }, - async function (definition_type, relative_file_path, wallet_name) { + async function (relative_file_path, wallet_name) { let absolute_path = path.resolve(relative_file_path); let wallet = this.getWallet(wallet_name); let output = await wallet_run_command( wallet, - `publish-${definition_type} --json-file ${absolute_path}` + `contract-definition publish ${absolute_path}` + ); + console.log(output.buffer); + } +); + +Then( + "I publish a contract constitution from file {string} on wallet {word} via command line", + { timeout: 120 * 1000 }, + async function (relative_file_path, wallet_name) { + let absolute_path = path.resolve(relative_file_path); + let wallet = this.getWallet(wallet_name); + + let output = await wallet_run_command( + wallet, + `publish-constitution-definition ${absolute_path}` ); console.log(output.buffer); } diff --git a/integration_tests/fixtures/constitution_definition.json b/integration_tests/fixtures/contract_constitution.json similarity index 100% rename from integration_tests/fixtures/constitution_definition.json rename to integration_tests/fixtures/contract_constitution.json diff --git a/integration_tests/helpers/walletProcess.js b/integration_tests/helpers/walletProcess.js index 2ca170bbbe..dc2dbadc9d 100644 --- a/integration_tests/helpers/walletProcess.js +++ b/integration_tests/helpers/walletProcess.js @@ -96,11 +96,13 @@ class WalletProcess { this.options["grpc_console_wallet_address"].match(/tcp\/(\d+)/); this.grpcPort = parseInt(regexMatch[1]); } + console.log(`--------------------- ${this.name} ----------------------`); console.log(overrides); + const configArgs = []; Object.keys(overrides).forEach((k) => { - args.push("-p"); - args.push(`${k}=${overrides[k]}`); + configArgs.push("-p"); + configArgs.push(`${k}=${overrides[k]}`); }); if (saveFile) { // clear the .env file @@ -113,7 +115,7 @@ class WalletProcess { }); } - const ps = spawn(cmd, args, { + const ps = spawn(cmd, [...configArgs, ...args], { cwd: this.baseDir, // shell: true, env: { ...process.env }, @@ -278,8 +280,6 @@ class WalletProcess { ".", "--password", "kensentme", - "--command", - command, "--non-interactive", "--network", "localnet", @@ -287,13 +287,19 @@ class WalletProcess { if (this.logFilePath) { args.push("--log-config", this.logFilePath); } + const overrides = this.getOverrides(); Object.keys(overrides).forEach((k) => { args.push("-p"); args.push(`${k}=${overrides[k]}`); }); + + // Append command arguments + args.push(...command.split(" ")); + let output = { buffer: "" }; // In case we killed the wallet fast send enter. Because it will ask for the logs again (e.g. whois test) + await this.run(await this.compile(), args, true, "\n", output, true); return output; }