Skip to content

Commit 16b41a5

Browse files
committed
[FAB-9524] Discovery Service e2e tests
This change set adds e2e tests for discovery service Change-Id: Id8fe8e209c226527aef5e2826352333badb0b3e3 Signed-off-by: nirro <nirro@il.ibm.com>
1 parent 32c05bd commit 16b41a5

10 files changed

+1854
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
Copyright IBM Corp All Rights Reserved.
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
package e2e
8+
9+
import (
10+
"encoding/json"
11+
12+
"github.com/hyperledger/fabric/integration/world"
13+
. "github.com/onsi/ginkgo"
14+
. "github.com/onsi/gomega"
15+
16+
"testing"
17+
)
18+
19+
func TestEndToEnd(t *testing.T) {
20+
RegisterFailHandler(Fail)
21+
RunSpecs(t, "Discovery Service EndToEnd Suite")
22+
}
23+
24+
var components *world.Components
25+
26+
var _ = SynchronizedBeforeSuite(func() []byte {
27+
components = &world.Components{}
28+
components.Build()
29+
30+
payload, err := json.Marshal(components)
31+
Expect(err).NotTo(HaveOccurred())
32+
33+
return payload
34+
}, func(payload []byte) {
35+
err := json.Unmarshal(payload, &components)
36+
Expect(err).NotTo(HaveOccurred())
37+
})
38+
39+
var _ = SynchronizedAfterSuite(func() {
40+
}, func() {
41+
components.Cleanup()
42+
})

0 commit comments

Comments
 (0)