Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Regression: Update pruning test #1775

Merged
merged 4 commits into from
Apr 7, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,27 @@ Feature: Test Bootstrapping With LS
Takes a node with a large db and transaction pruning enabled, and checks to make sure that the transactions below
the pruning depth are no longer present.

Given "checkConsistency" is called on "nodeD-m1" with:
Given "getInclusionStates" is called on "nodeD-m1" with:
|keys |values |type |
|tails |LS_PRUNED_TRANSACTIONS |staticValue |
|transactions |LS_PRUNED_TRANSACTIONS |staticValue |
|tips |LS_PRUNING_TIP |staticList |

Then the response for "checkConsistency" should return null
And the response for "getInclusionStates" should return with:
|keys |values |type |
|states |True |boolList |

# Trigger pruning and wait for it to finish
When the next 10 milestones are issued
And we wait "15" second/seconds

And "getInclusionStates" is called on "nodeD-m1" with:
|keys |values |type |
|transactions |LS_PRUNED_TRANSACTIONS |staticValue |
|tips |LS_PRUNING_TIP |staticList |

Then the response for "getInclusionStates" should return with:
|keys |values |type |
|states |False |boolList |


Scenario: Check unconfirmed transaction is spent from
Expand Down
13 changes: 7 additions & 6 deletions python-regression/util/static_vals.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,13 @@
]

LS_PRUNED_TRANSACTIONS = [
"FKGOUSFWFWSPQXPGEVBXQRYFRGFJWBXRYCXJDZTQWQBQKUJOGEY9JCIVYYSHGNFVIJBIXMZIVDUPBUIYA",
"EVQEKYWYYDSPHYDVPHATRUHBMKANTTIRA9FXXUYSVRBSEMESKWDBJBWBDARWMGBCFWGI9CFOEI9MXGMYX",
"HVGYYBVCBWKSMQFTFURLQWWRTNBKYXMXQ9QP9SHSNZJQQ9P9HL9IGNWZBTNMOOLV9GVOBPIBEUCXWNFAY",
"KESYDCSVJ9TJJIOIMHJDMD9BSPWHQVUIKEBSMYLBTUZZTKKFALDTMATCQWAKIQHNHHZLP9NJFZJMFNEMC",
"TJRXEMZZMORIHQSGOTRUFATRMMQF9NCGVVCKIDJFIMEZNXFGC9HZQQWZXTMIWILGYBBBFZURU99G9YRLY"
]
"ZUGEWWWKGETGGVVVTXYFSMAP9KLRYQJSVHNTYWEXQONNNHTCMAMQANEPEFKNAJYRFJINTSHXTGFOWYWO9",
"UXBNYASZOCIGHTDTGHLJWRMUHXABNDSTDFVJLBIA9SMGYEFYZLKQETFIAERHSY9YZVUEJUMCTNQE9NIMY",
"XJZMRLGVXLIBAYPYWMZGXUZZWJEFAXRPGAAYIALSI9UBRSYDACGO9UEQJEOVROIBQMAMIFGZJHGHKUNNB",
"HDXVLKMJNKQNPTTSBETLNRY9WNWXILCTNICEEWEUKHKFFAHKA9D99XQCPQRHOVOBEYTLARJORYGMNHUOZ"
]

LS_PRUNING_TIP = "HO9YADXIDEUJUKOZYNWVRS9PWDXCFXNVM9LEGPZMBJSJKKQAZBFPXYMH9VABBG9NLNIDQPDLVWDKOEAOW"

UNCONFIRMED_TEST_ADDRESS = [
"OXKSHMEQYDMJMDPJX9FIEJVWOKCROTCBRPCDCCSBPMZ9EEQMHTEDSDKIKAMZTYNYWIIMZBFY9IXBUGTZD"
Expand Down
2 changes: 2 additions & 0 deletions python-regression/util/test_logic/value_fetch_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def fetch_bool_list(value):
node = world.config['nodeId']

response = world.responses[api_call][node]
keys = list(response.keys())
response = response[keys[0]]

if value == "False":
return [False] * len(response)
Expand Down