-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathdlog_test.go
48 lines (43 loc) · 1.83 KB
/
dlog_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
Copyright IBM Corp All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package dlog
import (
"github.com/hyperledger-labs/fabric-smart-client/integration/nwo/fsc"
"github.com/hyperledger-labs/fabric-smart-client/pkg/api"
"github.com/hyperledger-labs/fabric-token-sdk/integration"
token2 "github.com/hyperledger-labs/fabric-token-sdk/integration/token"
"github.com/hyperledger-labs/fabric-token-sdk/integration/token/common"
"github.com/hyperledger-labs/fabric-token-sdk/integration/token/common/sdk/odlog"
"github.com/hyperledger-labs/fabric-token-sdk/integration/token/fungible"
"github.com/hyperledger-labs/fabric-token-sdk/integration/token/fungible/topology"
. "github.com/onsi/ginkgo/v2"
)
var _ = Describe("Orion EndToEnd", func() {
for _, t := range integration.AllTestTypes {
Describe("Orion ZKAT-DLog", t.Label, func() {
ts, selector := newTestSuite(t.CommType, t.ReplicationFactor, "alice", "bob", "charlie")
BeforeEach(ts.Setup)
AfterEach(ts.TearDown)
It("succeeded", func() { fungible.TestAll(ts.II, "auditor", nil, true, selector) })
It("Test redeem flow", Label("T1"), func() { fungible.TestRedeem(ts.II, selector, "orion") })
})
}
})
func newTestSuite(commType fsc.P2PCommunicationType, factor int, names ...string) (*token2.TestSuite, *token2.ReplicaSelector) {
opts, selector := token2.NewReplicationOptions(factor, names...)
ts := token2.NewTestSuite(StartPortDlog, topology.Topology(
common.Opts{
Backend: "orion",
CommType: commType,
DefaultTMSOpts: common.TMSOpts{TokenSDKDriver: "dlog", Aries: true},
SDKs: []api.SDK{&odlog.SDK{}},
// FSCLogSpec: "token-sdk=debug:orion-sdk=debug:info",
// FSCLogSpec: "token-sdk=debug:orion-sdk=debug:view-sdk.services.comm=debug:info",
ReplicationOpts: opts,
OnlyUnity: true,
},
))
return ts, selector
}