Documentation ¶
Overview ¶
Package peruntest implements test helpers for functionalities defined in perun package.
Index ¶
- func AssertAPIError(t *testing.T, e perun.APIError, categ perun.ErrorCategory, ...)
- func AssertErrInfoChainNotReachable(t *testing.T, info interface{}, chainURL string)
- func AssertErrInfoFailedPreCondUnclosedChs(t *testing.T, info interface{}, chInfos []perun.ChInfo)
- func AssertErrInfoInvalidArgument(t *testing.T, info interface{}, name perun.ArgumentName, value string)
- func AssertErrInfoInvalidConfig(t *testing.T, info interface{}, name, value string)
- func AssertErrInfoInvalidContracts(t *testing.T, info interface{}, contractErrInfos []perun.ContractErrInfo)
- func AssertErrInfoPeerNotFunded(t *testing.T, info interface{}, peerAlias string)
- func AssertErrInfoPeerRejected(t *testing.T, info interface{}, peerAlias, reason string)
- func AssertErrInfoPeerRequestTimedOut(t *testing.T, info interface{}, peerAlias, timeout string)
- func AssertErrInfoResourceExists(t *testing.T, info interface{}, resourceType perun.ResourceType, id string)
- func AssertErrInfoResourceNotFound(t *testing.T, info interface{}, resourceType perun.ResourceType, id string)
- func AssertErrInfoTxTimedOut(t *testing.T, info interface{}, txType, txID, txTimeout string)
- func AssertErrInfoUserResponseTimedOut(t *testing.T, info interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertAPIError ¶
func AssertAPIError(t *testing.T, e perun.APIError, categ perun.ErrorCategory, code perun.ErrorCode, msgs ...string)
AssertAPIError tests if the passed error contains expected category, code and phrases in the message.
func AssertErrInfoChainNotReachable ¶
AssertErrInfoChainNotReachable tests if additional info field is of correct type and has expected values.
func AssertErrInfoFailedPreCondUnclosedChs ¶
AssertErrInfoFailedPreCondUnclosedChs tests if additional info field is of correct type and has expected values.
func AssertErrInfoInvalidArgument ¶
func AssertErrInfoInvalidArgument(t *testing.T, info interface{}, name perun.ArgumentName, value string)
AssertErrInfoInvalidArgument tests if additional info field is of correct type and has expected values.
func AssertErrInfoInvalidConfig ¶
AssertErrInfoInvalidConfig tests if additional info field is of correct type and has expected values.
func AssertErrInfoInvalidContracts ¶
func AssertErrInfoInvalidContracts(t *testing.T, info interface{}, contractErrInfos []perun.ContractErrInfo)
AssertErrInfoInvalidContracts tests if additional info field is of correct type and has expected values.
func AssertErrInfoPeerNotFunded ¶
AssertErrInfoPeerNotFunded tests if additional info field is of correct type and has expected values.
func AssertErrInfoPeerRejected ¶
AssertErrInfoPeerRejected tests if additional info field is of correct type and has expected values.
func AssertErrInfoPeerRequestTimedOut ¶
AssertErrInfoPeerRequestTimedOut tests if additional info field is of correct type and has expected values.
func AssertErrInfoResourceExists ¶
func AssertErrInfoResourceExists(t *testing.T, info interface{}, resourceType perun.ResourceType, id string)
AssertErrInfoResourceExists tests if additional info field is of correct type and has expected values.
func AssertErrInfoResourceNotFound ¶
func AssertErrInfoResourceNotFound(t *testing.T, info interface{}, resourceType perun.ResourceType, id string)
AssertErrInfoResourceNotFound tests if additional info field is of correct type and has expected values.
func AssertErrInfoTxTimedOut ¶
AssertErrInfoTxTimedOut tests if additional info field is of correct type and has expected values.
func AssertErrInfoUserResponseTimedOut ¶
AssertErrInfoUserResponseTimedOut tests if additional info field is of correct type and has expected values.
Types ¶
This section is empty.