Skip to content

Commit 58aca66

Browse files
committed
FAB-898: Fix Missing IP address in behave
The IP addresses were not always listed when starting the peers in the docker compose files. The checks were comparing ascii strings with unicode strings and the peer were paused to allow the containers to get an IP address when performing the docker inspect command. Change-Id: I6a5045f9b6849fae8d2ca8eeeac3495a8e1889b3 Signed-off-by: Latitia M Haskins <[email protected]>
1 parent a293bc9 commit 58aca66

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bddtests/compose-defaults.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ vp:
1010
# $$GOPATH (double dollar) required to prevent docker-compose doing its own
1111
# substitution before the value gets to the container
1212
#command: sh -c "exec $$GOPATH/src/github.com/hyperledger/fabric/bddtests/scripts/start-peer.sh"
13-
command: peer node start
13+
command: sh -c "sleep 2; peer node start"
1414

1515
# Use these options if coverage desired for peers
1616
#image: hyperledger/fabric-peer-coverage

bddtests/steps/compose.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def rebuildContainerData(self):
7979
output, error, returncode = \
8080
bdd_test_util.cli_call(["docker", "inspect", "--format", "{{ .Config.Labels }}", containerID], expect_success=True)
8181
labels = output.splitlines()[0][4:-1].split()
82-
dockerComposeService = [composeService[27:] for composeService in labels if composeService.startswith("com.docker.compose.service:")][0]
82+
dockerComposeService = [unicode(composeService[27:]) for composeService in labels if composeService.startswith("com.docker.compose.service:")][0]
8383
#print("dockerComposeService = {0}".format(dockerComposeService))
8484
#print("container {0} has env = {1}".format(containerName, env))
8585
self.containerDataList.append(peer_basic_impl.ContainerData(containerName, ipAddress, env, dockerComposeService))

0 commit comments

Comments
 (0)