uptest-sc / uptest

"curl" for substrate runtime upgrade testing
7 stars 4 forks source link

upgrade change diff to include The comparison of the storage type before it was changed #73

Closed flipchan closed 12 months ago

flipchan commented 12 months ago

uptest atm only supports saying that a storage map has changed and display the new value, this issue is for seeing the before type

flipchan commented 12 months ago

Example working:

$ cargo run -p uptest-examples --example upgrade_change_diff
Connected to: "node-template"  Runtime version: 108
Waiting for custom event to be triggered
Event detected in block: 0xcfc694bfaf140d925bf26f7c5d4ef1a206ebd04ebf08e29846d640528c3175cb
Having a coffee break before next block...
Scanning the new metadata for changes
Runtime upgraded from version: 108 to new version: 109
Pallet name:  "TemplateModule"
Storage item name:  "Something6" 
Storage item type:  StorageValue 
Old storage type:  Primitive(U128)
New storage type: Primitive(Bool)
flipchan commented 12 months ago
 ./target/release/uptest  -c ws://127.0.0.1:9944
Uptest command line tool
running ws host: "ws://127.0.0.1:9944"
Connected to chain
Gathered current storage types
Waiting for runtime upgrade
Runtime upgrade in block: 0xb91bc8ed09a7a3e0accbaa92720412f382f4ae211218acece279a251bd67189c
Having a coffee break before next block...
Scanning the new metadata for changes
Runtime upgraded from version: 108 to new version: 109
Pallet name:  "TemplateModule"
    Storage item name:  "Something" 
    Storage item type:  StorageValue 
    Old storage type:  Primitive(U32)
    New storage type: Primitive(U64)

Pallet name:  "TemplateModule"
    Storage item name:  "Something6" 
    Storage item type:  StorageValue 
    Old storage type:  Primitive(U128)
    New storage type: Primitive(Bool)