Merge "gitea: test loadbalancer to gitea"
This commit is contained in:
commit
ef68abee8e
@ -29,3 +29,15 @@ def test_haproxy_statsd_running(host):
|
||||
out = json.loads(cmd.stdout)
|
||||
assert out[0]["State"]["Status"] == "running"
|
||||
assert out[0]["RestartCount"] == 0
|
||||
|
||||
def test_haproxy_gitea_connection(host):
|
||||
cmd = host.run('curl --resolve opendev.org:443:127.0.0.1 '
|
||||
'https://opendev.org')
|
||||
assert 'OpenDev: Free Software Needs Free Tools' in cmd.stdout
|
||||
|
||||
def test_haproxy_stats(host):
|
||||
cmd = host.run('echo "show servers state" | socat /var/haproxy/run/stats stdio | '
|
||||
'tail +3 | awk \'{print $2,$4,$6}\'')
|
||||
|
||||
assert 'balance_git_http gitea99.opendev.org 2' in cmd.stdout
|
||||
assert 'balance_git_https gitea99.opendev.org 2' in cmd.stdout
|
||||
|
Loading…
x
Reference in New Issue
Block a user