Gabriel Cocenza 1c9e662d78 Add support for HAProxy L7 checks
This change adds the haproxy options if defined by the
charm class to enable HTTP checks to the HAProxy
configuration, instead of the default TCP connection
checks.

options.ssl check if the environment is using http or
https mode. We disable certificate verification because
we are only interested in the health of the service.

Fix for tox4 compability

Closes-Bug: #1880610
Change-Id: Ie091fdfe560b6a060f0c29c6b92a99f5e564eddf
2023-02-03 18:19:20 -03:00

53 lines
1.6 KiB
INI

[tox]
envlist = pep8
toxworkdir = /tmp/tox
# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False
# NOTE(beisner): Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
[testenv]
# We use tox mainly for virtual environment management for test requirements
# and do not install the charm code as a Python package into that environment.
# Ref: https://tox.wiki/en/latest/config.html#skip_install
skip_install = True
basepython = python3
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
TERM=linux
JUJU_REPOSITORY={envdir}/tmp/build
passenv =
http_proxy
https_proxy
deps =
-r{toxinidir}/requirements.txt
whitelist_externals = /bin/true /bin/echo /bin/mkdir /bin/ln
[testenv:build]
# ``charm build`` refuses to output to a subdirectory to the source tree
# The gate check will look for and validate the built artifacts in the source
# tree.
# Build the artifats under /tmp and link back to source directory to alleviate.
commands =
/bin/echo 'WARNING: *build* target is for testing only.'
/bin/mkdir -p {envdir}/tmp
/bin/mkdir -p {envdir}/tmp/build
charm-build --log-level DEBUG -o {envdir}/tmp/build/builds .
/bin/ln -s {envdir}/tmp/build/builds/ {envdir}/tmp/build/trusty
/bin/ln -s {envdir}/tmp/build {toxinidir}/build
allowlist_externals =
/bin/*
[testenv:venv]
commands = {posargs}
[testenv:py3]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
commands = /bin/true
[testenv:pep8]
basepython = python3
commands = flake8 --ignore=E402,W503,W504 actions/ reactive/