README.md 2.26 KB
Newer Older
1
2
# Heptapod automated functional tests

3
4
5
WARNING: don't try and run these on anything but a throwable development
instance

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Installation

### Client-side install

- tox: `pip install --user tox`
- [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/home):

  + Fedora 29: `dnf install chromedriver`
  + Debian 9: `apt install chromium-driver`

### Heptapod install

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.
- The Gitlab root password will be initialized by the test.

## Running the tests

Just do: `tox` from the `heptapod-tests` directory, as an user that can
issue Docker commands.

This will test the current state of your Heptapod container.

### Choosing the version to test

35
36
The versions installed in the Docker image you're using are specified by the
[heptapod_revisions.json](https://dev.heptapod.net/heptapod/omnibus/blob/branch/heptapod/heptapod_docker/heptapod_revisions.json) file.
37

38
To test your local clone of heptapod/heptapod:
39
40

- mount your local `heptapod` clone in the container (assuming below it's seen
41
  as `/home/heptapod-rails` from the container)
42
43
44
45
- execute the following in the container:

  ```
  cd /var/opt/gitlab/embedded/service/gitlab-rails
46
47
  hg pull --config phases.publish=False /home/heptapod-rails
  hg up -r WISHED_REVISION
48
49
  gitlab-ctl restart unicorn
  ```
50
51
52

If you want to try changes to other components (e.g., `hg-git`), do something similar.
The paths can be seen in the Docker build logs, or you can read them in the [install script](https://dev.heptapod.net/heptapod/omnibus/blob/branch/heptapod/heptapod_docker/assets/install_heptapod.py)
53
54
55
56
57
58
59
60
61
62
63
64
65
66

## Adding new tests

### Branch and topics rules

The convention is that the tests in the default branch should pass against
the current `octobus/heptapod:latest` Docker image, so

* if you want to share a bug reproduction, please open a new topic
* even if a bug fix in heptapod has landed, please wait for Docker push to
  publish the corresponding tests
* tests can be published before a Heptapod new release, but please have the
  corresponding fixes landed and pushed to Docker Hub first.