Skip to content

Commit

Permalink
Fixed ping context for test env
Browse files Browse the repository at this point in the history
  • Loading branch information
ktogias committed Jul 23, 2022
1 parent b58e151 commit 702e927
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev/tests/features/bootstrap/PingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class PingContext implements Context
{
protected int $port;

protected string $host;

protected Curl $curl;

/**
Expand All @@ -34,6 +36,7 @@ public function __construct()
public function theServicePortIsDefined()
{
$this->port = getenv('HTTP_PORT');
$this->host = getenv('HTTP_HOST')?:'localhost';
}

/**
Expand All @@ -42,7 +45,7 @@ public function theServicePortIsDefined()
public function iDoHttpGet()
{
$this->curl = new Curl();
$this->curl->get('http://localhost:'.$this->port);
$this->curl->get('http://'.$this->host.':'.$this->port);
}

/**
Expand Down
1 change: 1 addition & 0 deletions ops/envs/test/comp/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ services:
HOST_GID: ${HOST_UID}
HOST_UID: ${HOST_UID}
HTTP_PORT: ${HTTP_PORT}
HTTP_HOST: event-dispatcher
TZ: ${TIME_ZONE}
MESSAGE_BROKER_HOST: ${MESSAGE_BROKER_HOST}
MESSAGE_BROKER_PORT: ${MESSAGE_BROKER_PORT}
Expand Down

0 comments on commit 702e927

Please sign in to comment.