Commit 9a5049c 1 parent bd14ee7 commit 9a5049c Copy full SHA for 9a5049c
File tree 5 files changed +11
-11
lines changed
container/dockercontroller
5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ import (
21
21
"testing"
22
22
23
23
"github.com/hyperledger/fabric/common/util"
24
- "github.com/hyperledger/fabric/core/config"
25
24
"github.com/hyperledger/fabric/core/container"
25
+ "github.com/hyperledger/fabric/core/testutil"
26
26
pb "github.com/hyperledger/fabric/protos/peer"
27
27
)
28
28
29
29
func TestMain (m * testing.M ) {
30
- config .SetupTestConfig ("../../../../../peer" )
30
+ testutil .SetupTestConfig ("../../../../../peer" )
31
31
os .Exit (m .Run ())
32
32
}
33
33
Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ import (
21
21
"testing"
22
22
23
23
"github.com/hyperledger/fabric/common/util"
24
- "github.com/hyperledger/fabric/core/config"
25
24
"github.com/hyperledger/fabric/core/container"
25
+ "github.com/hyperledger/fabric/core/testutil"
26
26
pb "github.com/hyperledger/fabric/protos/peer"
27
27
)
28
28
29
29
func TestMain (m * testing.M ) {
30
- config .SetupTestConfig ("../../../../../peer" )
30
+ testutil .SetupTestConfig ("../../../../../peer" )
31
31
os .Exit (m .Run ())
32
32
}
33
33
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import (
24
24
25
25
"github.com/spf13/viper"
26
26
27
- "github.com/hyperledger/fabric/core/config "
27
+ "github.com/hyperledger/fabric/core/testutil "
28
28
"github.com/stretchr/testify/assert"
29
29
"google.golang.org/grpc"
30
30
)
@@ -52,7 +52,7 @@ VQQLDAtIeXBlcmxlZGdlcjESMBAGA1UEAwwJbG9jYWxob3N0MFkwEwYHKoZIzj0C
52
52
`
53
53
54
54
func TestConnection_Correct (t * testing.T ) {
55
- config .SetupTestConfig ("./../../peer" )
55
+ testutil .SetupTestConfig ("./../../peer" )
56
56
viper .Set ("ledger.blockchain.deploy-system-chaincode" , "false" )
57
57
peerAddress := GetPeerTestingAddress ("7051" )
58
58
var tmpConn * grpc.ClientConn
@@ -69,7 +69,7 @@ func TestConnection_Correct(t *testing.T) {
69
69
}
70
70
71
71
func TestConnection_WrongAddress (t * testing.T ) {
72
- config .SetupTestConfig ("./../../peer" )
72
+ testutil .SetupTestConfig ("./../../peer" )
73
73
viper .Set ("ledger.blockchain.deploy-system-chaincode" , "false" )
74
74
peerAddress := GetPeerTestingAddress ("7052" )
75
75
var tmpConn * grpc.ClientConn
Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ import (
25
25
"github.com/spf13/viper"
26
26
27
27
"github.com/hyperledger/fabric/common/ledger/testutil"
28
- "github.com/hyperledger/fabric/core/config "
28
+ coreutil "github.com/hyperledger/fabric/core/testutil "
29
29
)
30
30
31
31
func TestHostConfig (t * testing.T ) {
32
- config .SetupTestConfig ("./../../../peer" )
32
+ coreutil .SetupTestConfig ("./../../../peer" )
33
33
var hostConfig = new (docker.HostConfig )
34
34
err := viper .UnmarshalKey ("vm.docker.hostConfig" , hostConfig )
35
35
if err != nil {
@@ -44,7 +44,7 @@ func TestHostConfig(t *testing.T) {
44
44
func TestGetDockerHostConfig (t * testing.T ) {
45
45
os .Setenv ("HYPERLEDGER_VM_DOCKER_HOSTCONFIG_NETWORKMODE" , "overlay" )
46
46
os .Setenv ("HYPERLEDGER_VM_DOCKER_HOSTCONFIG_CPUSHARES" , fmt .Sprint (1024 * 1024 * 1024 * 2 ))
47
- config .SetupTestConfig ("./../../../peer" )
47
+ coreutil .SetupTestConfig ("./../../../peer" )
48
48
hostConfig := getDockerHostConfig ()
49
49
testutil .AssertNotNil (t , hostConfig )
50
50
testutil .AssertEquals (t , hostConfig .NetworkMode , "overlay" )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- package config
17
+ package testutil
18
18
19
19
import (
20
20
"flag"
You can’t perform that action at this time.
0 commit comments