Skip to content

Commit

Permalink
[FAB-14298] Move BasicSoloV20 to consumer
Browse files Browse the repository at this point in the history
Change-Id: Icc46fd517457f335ca2008226380edfe9b950d06
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm committed Feb 28, 2019
1 parent 484ba11 commit 38f54cb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
11 changes: 0 additions & 11 deletions integration/nwo/standard_networks.go
Expand Up @@ -86,17 +86,6 @@ func BasicSolo() *Config {
}
}

// BasicSoloV20 returns a BasicSolo config with V2_0 application capability
func BasicSoloV20() *Config {
basicSolo := BasicSolo()
for _, profile := range basicSolo.Profiles {
if profile.Consortium != "" {
profile.AppCapabilities = []string{"V2_0"}
}
}
return basicSolo
}

func BasicKafka() *Config {
config := BasicSolo()
config.Consensus.Type = "kafka"
Expand Down
10 changes: 10 additions & 0 deletions integration/token/token_suite_test.go
Expand Up @@ -43,3 +43,13 @@ var _ = SynchronizedAfterSuite(func() {
func ToHex(q uint64) string {
return "0x" + strconv.FormatUint(q, 16)
}

func BasicSoloV20() *nwo.Config {
basicSolo := nwo.BasicSolo()
for _, profile := range basicSolo.Profiles {
if profile.Consortium != "" {
profile.AppCapabilities = []string{"V2_0"}
}
}
return basicSolo
}
9 changes: 4 additions & 5 deletions integration/token/token_test.go
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/hyperledger/fabric/token/tms/plain"

"github.com/fsouza/go-dockerclient"
docker "github.com/fsouza/go-dockerclient"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/bccsp/sw"
"github.com/hyperledger/fabric/integration/nwo"
Expand Down Expand Up @@ -138,7 +138,7 @@ var _ bool = Describe("Token EndToEnd", func() {
Describe("basic solo network for token transaction e2e using Token CLI", func() {
BeforeEach(func() {
var err error
network = nwo.New(nwo.BasicSoloV20(), testDir, client, 30000, components)
network = nwo.New(BasicSoloV20(), testDir, client, 30000, components)
network.GenerateConfigTree()

network.Bootstrap()
Expand Down Expand Up @@ -221,10 +221,9 @@ var _ bool = Describe("Token EndToEnd", func() {
})

Describe("basic solo network for token transaction e2e", func() {

BeforeEach(func() {
var err error
network = nwo.New(nwo.BasicSoloV20(), testDir, client, 30000, components)
network = nwo.New(BasicSoloV20(), testDir, client, 30000, components)
network.GenerateConfigTree()

network.Bootstrap()
Expand Down Expand Up @@ -328,7 +327,7 @@ var _ bool = Describe("Token EndToEnd", func() {

BeforeEach(func() {
var err error
network = nwo.New(nwo.BasicSoloV20(), testDir, client, 30000, components)
network = nwo.New(BasicSoloV20(), testDir, client, 30000, components)
network.GenerateConfigTree()

network.Bootstrap()
Expand Down

0 comments on commit 38f54cb

Please sign in to comment.