Blame


1 6ae16afd 2022-10-31 stsp Running server regression tests requires some manual system preparation.
2 6ae16afd 2022-10-31 stsp
3 6f854dde 2023-01-04 stsp Two dedicated user accounts must be created. Password login
4 ad8ccd55 2022-10-31 op for these users should be disabled.
5 6ae16afd 2022-10-31 stsp
6 6f854dde 2023-01-04 stsp $ doas useradd -m got
7 6f854dde 2023-01-04 stsp $ doas useradd -m gotdev
8 6ae16afd 2022-10-31 stsp
9 6f854dde 2023-01-04 stsp The above user names correspond to defaults used by the test suite.
10 6ae16afd 2022-10-31 stsp If needed, the defaults can be overridden on by passing values for the
11 6ae16afd 2022-10-31 stsp following variables to make(1): GOTD_USER, GOTD_DEVUSER, GOTD_GROUP
12 6ae16afd 2022-10-31 stsp
13 6ae16afd 2022-10-31 stsp An SSH key must be added to ~gotdev/.ssh/authorized_keys, such that the
14 6ae16afd 2022-10-31 stsp following command succeeds non-interactively:
15 6ae16afd 2022-10-31 stsp
16 6ae16afd 2022-10-31 stsp $ ssh gotdev@127.0.0.1
17 6ae16afd 2022-10-31 stsp
18 6ae16afd 2022-10-31 stsp The login shell of the gotdev user should be set to gotsh(1).
19 6ae16afd 2022-10-31 stsp It is recommended to run the test suite using a locally built gotsh binary,
20 6ae16afd 2022-10-31 stsp rather than /usr/local/bin/gotsh (which might be using messages in an
21 6ae16afd 2022-10-31 stsp out-of-date format on the gotd socket).
22 6ae16afd 2022-10-31 stsp For this to work, $HOME/bin/gotsh must be added to /etc/shells first.
23 6ae16afd 2022-10-31 stsp
24 6ae16afd 2022-10-31 stsp $ doas usermod -s $HOME/bin/gotsh gotdev
25 6ae16afd 2022-10-31 stsp
26 6ae16afd 2022-10-31 stsp If adding this file to /etc/shells is a problem, a locally built gotsh
27 6ae16afd 2022-10-31 stsp binary can be made available in the command search path of the gotdev
28 6ae16afd 2022-10-31 stsp user under the names git-receive-pack and git-upload-pack. When made
29 6ae16afd 2022-10-31 stsp available in a non-standard PATH directory such as ~gotdev/bin, the
30 6ae16afd 2022-10-31 stsp gotdev user's PATH must be set appropriately in sshd_config (see below).
31 6ae16afd 2022-10-31 stsp
32 b50a2b46 2022-12-29 stsp By default, tests will run the gotd binary found in ~/bin.
33 b50a2b46 2022-12-29 stsp If sources were unpacked from a Got release tarball then tests will run
34 b50a2b46 2022-12-29 stsp /usr/local/bin/gotd by default instead.
35 b50a2b46 2022-12-29 stsp
36 6ae16afd 2022-10-31 stsp The test suite creates the corresponding gotd socket in ~gotdev/gotd.sock.
37 6ae16afd 2022-10-31 stsp To make this work, the GOTD_UNIX_SOCKET variable must be set by sshd
38 6ae16afd 2022-10-31 stsp when the gotdev user logs in. The following should be added to the file
39 6ae16afd 2022-10-31 stsp /etc/ssh/sshd_config:
40 6ae16afd 2022-10-31 stsp
41 6ae16afd 2022-10-31 stsp Match User gotdev
42 6ae16afd 2022-10-31 stsp SetEnv GOTD_UNIX_SOCKET=/home/gotdev/gotd.sock
43 6ae16afd 2022-10-31 stsp # The following line is not needed when gotsh is used as login shell:
44 6ae16afd 2022-10-31 stsp SetEnv PATH=/home/gotdev/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
45 6ae16afd 2022-10-31 stsp DisableForwarding yes
46 6ae16afd 2022-10-31 stsp PermitTTY no
47 6ae16afd 2022-10-31 stsp
48 6ae16afd 2022-10-31 stsp sshd must be restarted for configuration changes to take effect:
49 6ae16afd 2022-10-31 stsp
50 6ae16afd 2022-10-31 stsp $ doas rcctl restart sshd
51 6ae16afd 2022-10-31 stsp
52 6ae16afd 2022-10-31 stsp The server test suite can now be run from the top-level directory:
53 6ae16afd 2022-10-31 stsp
54 6ae16afd 2022-10-31 stsp $ doas pkg_add git # if not already done
55 6ae16afd 2022-10-31 stsp $ doas make server-regress
56 6ae16afd 2022-10-31 stsp
57 6ae16afd 2022-10-31 stsp The suite must be started as root in order to be able to start and stop gotd.
58 6ae16afd 2022-10-31 stsp The test suite switches to non-root users as appropriate.