Skip to content

Commit

Permalink
Merge pull request #3178 from input-output-hk/piotr/adp-1513/adjust-t…
Browse files Browse the repository at this point in the history
…ests

Adjust e2e tests
  • Loading branch information
piotr-iohk authored Mar 18, 2022
2 parents 4e147fc + 7edf13c commit a250581
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ jobs:
env:
NETWORK: ${{ github.event.inputs.network || 'testnet' }}
TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
PR: ${{ github.event.inputs.pr || '' }}
PR: ${{ github.event.inputs.pr || 'master' }}
10 changes: 8 additions & 2 deletions test/e2e/spec/e2e_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
teardown
end

after(:all) do
SHELLEY.stake_pools.quit(@target_id, PASS)
end

describe "E2E Balance -> Sign -> Submit" do

def run_script(script, payload)
Expand Down Expand Up @@ -532,7 +536,7 @@ def run_contract(contract_setup, scripts)
expect(stake_keys['ours'].first['stake']['quantity']).to eq expected_join_balance
expect(stake_keys['none']['stake']['quantity']).to eq 0
expect(stake_keys['ours'].first['delegation']['active']['status']).to eq "not_delegating"
expect(stake_keys['ours'].first['delegation']['next'].first['status']).to eq "delegating"
expect(stake_keys['ours'].first['delegation']['next'].last['status']).to eq "delegating"

# Quit pool
quit_pool = [{ "quit" => { "stake_key_index" => "0H" } }]
Expand Down Expand Up @@ -579,6 +583,7 @@ def run_contract(contract_setup, scripts)
expect(stake_keys['none']['stake']['quantity']).to eq 0
expect(stake_keys['ours'].first['delegation']['active']['status']).to eq "not_delegating"
expect(stake_keys['ours'].first['delegation']['next'].first['status']).to eq "not_delegating"
expect(stake_keys['ours'].first['delegation']['next'].last['status']).to eq "not_delegating"
end
end

Expand Down Expand Up @@ -951,7 +956,7 @@ def run_contract(contract_setup, scripts)
expect(stake_keys['ours'].first['stake']['quantity']).to eq stake_after_joining
expect(stake_keys['none']['stake']['quantity']).to eq 0
expect(stake_keys['ours'].first['delegation']['active']['status']).to eq "not_delegating"
expect(stake_keys['ours'].first['delegation']['next'].first['status']).to eq "delegating"
expect(stake_keys['ours'].first['delegation']['next'].last['status']).to eq "delegating"

# Quit pool
puts "Quitting pool: #{pool_id}"
Expand All @@ -978,6 +983,7 @@ def run_contract(contract_setup, scripts)
expect(stake_keys['none']['stake']['quantity']).to eq 0
expect(stake_keys['ours'].first['delegation']['active']['status']).to eq "not_delegating"
expect(stake_keys['ours'].first['delegation']['next'].first['status']).to eq "not_delegating"
expect(stake_keys['ours'].first['delegation']['next'].last['status']).to eq "not_delegating"
end
end

Expand Down

0 comments on commit a250581

Please sign in to comment.