diff --git a/integration/ports.go b/integration/ports.go index 08bfcc198a..fb63d63b15 100755 --- a/integration/ports.go +++ b/integration/ports.go @@ -60,8 +60,8 @@ var ( AllTestTypes = []*InfrastructureType{ WebSocketNoReplication, - LibP2PNoReplication, - WebSocketWithReplication, + // LibP2PNoReplication, + // WebSocketWithReplication, } ) diff --git a/integration/token/fungible/ofabtoken/fabtoken_test.go b/integration/token/fungible/ofabtoken/fabtoken_test.go index 82294f3d1c..9dd4864d7d 100644 --- a/integration/token/fungible/ofabtoken/fabtoken_test.go +++ b/integration/token/fungible/ofabtoken/fabtoken_test.go @@ -25,6 +25,7 @@ var _ = Describe("Orion EndToEnd", func() { BeforeEach(ts.Setup) AfterEach(ts.TearDown) It("succeeded", Label("T1"), func() { fungible.TestAll(ts.II, "auditor", nil, true, true, selector) }) + It("Test redeem", Label("T2"), func() { fungible.TestRedeem(ts.II, selector, "orion") }) }) } }) diff --git a/integration/token/fungible/tests.go b/integration/token/fungible/tests.go index 159a3d414a..915dc92a99 100644 --- a/integration/token/fungible/tests.go +++ b/integration/token/fungible/tests.go @@ -1460,3 +1460,31 @@ func TestMultiSig(network *integration.Infrastructure, sel *token3.ReplicaSelect CheckCoOwnedBalance(network, charlie, "", "USD", 0) CheckCoOwnedBalance(network, manager, "", "USD", 0) } + +func TestRedeem(network *integration.Infrastructure, sel *token3.ReplicaSelector, networkName string) { + auditor := sel.Get("auditor") + issuer := sel.Get("issuer") + alice := sel.Get("alice") + + RegisterAuditor(network, auditor) + + // give some time to the nodes to get the public parameters - Q - may now be needed. waiting in UpdatePublicParamsAndWait. + time.Sleep(10 * time.Second) + + SetKVSEntry(network, issuer, "auditor", auditor.Id()) + CheckPublicParams(network, issuer, auditor, alice) + + Eventually(DoesWalletExist).WithArguments(network, issuer, "", views.IssuerWallet).WithTimeout(1 * time.Minute).WithPolling(15 * time.Second).Should(Equal(true)) + Eventually(DoesWalletExist).WithArguments(network, issuer, "pineapple", views.IssuerWallet).WithTimeout(1 * time.Minute).WithPolling(15 * time.Second).Should(Equal(false)) + + IssueCash(network, "", "USD", 110, alice, auditor, true, issuer) + CheckBalance(network, alice, "", "USD", 110) + CheckHolding(network, alice, "", "USD", 110, auditor) + + RedeemCash(network, alice, "", "USD", 10, auditor, issuer) + CheckBalance(network, alice, "", "USD", 100) + CheckHolding(network, alice, "", "USD", 100, auditor) + + TransferCash(network, alice, "", "USD", 10, issuer, auditor) + CheckBalance(network, alice, "", "USD", 90) +}