Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FAB-18120] Adding DevMode integration test for new lifecycle.
* Added integration test for DevMode using new lifecycle. Signed-off-by: Chongxin Luo <Chongxin.Luo@ibm.com>
- Loading branch information
Showing
9 changed files
with
416 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Copyright IBM Corp All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package devmode | ||
|
||
import ( | ||
"encoding/json" | ||
"testing" | ||
|
||
"github.com/hyperledger/fabric/integration" | ||
"github.com/hyperledger/fabric/integration/nwo" | ||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestEndToEnd(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "Devmode Suite") | ||
} | ||
|
||
var ( | ||
buildServer *nwo.BuildServer | ||
components *nwo.Components | ||
) | ||
|
||
var _ = SynchronizedBeforeSuite(func() []byte { | ||
buildServer = nwo.NewBuildServer() | ||
buildServer.Serve() | ||
|
||
components = buildServer.Components() | ||
payload, err := json.Marshal(components) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
return payload | ||
}, func(payload []byte) { | ||
err := json.Unmarshal(payload, &components) | ||
Expect(err).NotTo(HaveOccurred()) | ||
}) | ||
|
||
var _ = SynchronizedAfterSuite(func() { | ||
}, func() { | ||
components.Cleanup() | ||
}) | ||
|
||
func StartPort() int { | ||
return integration.DevModePort.StartPortForNode() | ||
} |
Oops, something went wrong.