hyperledger-labs / perun-node

State channel node of the blockchain-agnostic state channels framework Perun.
https://labs.hyperledger.org/perun-doc/
Apache License 2.0
18 stars 12 forks source link

Add test cases for both collaborative close and non collaborative close in the integrations of session package. #163

Closed manoranjith closed 3 years ago

manoranjith commented 3 years ago

Motivation / Context

Recently the go-perun version used in perun-node was updated to v0.6.0. In this version the channel closing logic differs significantly for collaborative and non-collaborative case. Each of the two cases have been handled differently in perun node (see HandleAdjudicator function in session/channel.go for detailed explanation). Hence integration tests should cover both these cases. Currently it covers only collaborative close.

Description

To cover both collaborative and non collaborative case in integration tests, in Test_Integ_Role,

  1. Create two channels (currently only one is created).
  2. Close one of them in collaborative way and the other in non collaborative way.
Relates to

Follow up from #161

Testing

The modified tests should cover collaborative and non collaborative close.

Thread Safety

-NA-