Commit fab2618f authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

ssh: defining host name and port for SSH testing

From now on, the forwarded ports of the Heptapod container
will have to be on the `heptapod` host, as explained in

The Heptapod object now has a `ssh_url` property that will
serve as the base for performing hg commands over SSH.
parent 64255d4e24cd
......@@ -14,14 +14,20 @@ instance
+ Debian 9: `apt install chromium-driver`
### Heptapod install
*Changed for Heptapod 0.8 (SSH support)*
It's currently not possible to configure details about the heptapod install
(URL, passwords etc)
- Run a fresh Docker container named `heptapod`, and answering on
`http://localhost:81`. The tests will issue both `docker exec` commands
and HTTP requests.
- Make sure the `heptapod` host name resolves to something (typically a
host-only IP address such as from the system running the tests.
- Run a fresh Docker container named `heptapod`, answering on
`http://heptapod:81` and on `ssh://heptapod:2022`.
The tests will issue `docker exec` commands, HTTP requests and SSH
- The Gitlab root password will be initialized by the test.
- Run `ssh -p 2022 heptapod` once, to accept the server key. This will
be relaxed in future versions of these tests.
## Running the tests
......@@ -26,6 +26,7 @@ logger = logging.getLogger(__name__)
class Heptapod(object):
host = attr.ib()
port = attr.ib()
ssh_port = attr.ib()
scheme = attr.ib()
users = attr.ib()
dead = attr.ib(default=None) # None means we don't know yet
......@@ -44,6 +45,13 @@ class Heptapod(object):
def ssh_url(self):
return 'ssh://git@{host}:{port}'.format(,
def api_url(self):
return '/'.join((self.url, 'api', 'v4'))
......@@ -129,8 +137,9 @@ class Heptapod(object):
def heptapod():
heptapod = Heptapod(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment