Skip to content

Commit

Permalink
Add test case for address sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 committed Feb 7, 2025
1 parent 57e748c commit b07d057
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions integration-tests/relayinterface/chain_components_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ func RunChainComponentsSolanaTests[T TestingT[T]](t T, it *SolanaChainComponents
assert.Equal(t, addressToBeShared, bound2[0].Address)
})

t.Run("Namespace is part of an address share group that has a registered address and provides a wrong address during Bind", func(t T) {
key, err := solana.NewRandomPrivateKey()
require.NoError(t, err)

bound2 := []types.BoundContract{{
Name: AnyContractNameWithSharedAddress2,
Address: key.PublicKey().String()}}
require.Error(t, cr.Bind(ctx, bound2))
})

t.Run("Namespace is part of an address share group that has a registered address and provides no address during Bind", func(t T) {
bound3 := []types.BoundContract{{Name: AnyContractNameWithSharedAddress3}}
require.NoError(t, cr.Bind(ctx, bound3))
Expand Down

0 comments on commit b07d057

Please sign in to comment.