-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smoke test and source from projectcontur
KU-1063
- Loading branch information
Maciek Golaszewski
committed
Jul 15, 2024
1 parent
3feb4dc
commit 5e6bd29
Showing
7 changed files
with
101 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# contour-rock | ||
OCI image for [contour](https://bitnami.com/stack/contour) based on Ubuntu 22.04 built using [rockcraft](https://github.com/canonical/rockcraft). | ||
OCI image for [contour](https://projectcontour.io/) based on Ubuntu 22.04 built using [rockcraft](https://github.com/canonical/rockcraft). | ||
|
||
Image is loosely based on original Dockerfile [](https://github.com/bitnami/containers/blob/main/bitnami/contour/1.28/debian-12/Dockerfile) | ||
Image is loosely based on original [Dockerfile](https://github.com/projectcontour/contour/blob/main/Dockerfile) and [Makefile](https://github.com/projectcontour/contour/blob/main/Makefile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
black==24.3.0 | ||
codespell==2.2.4 | ||
flake8==6.0.0 | ||
isort==5.12.0 | ||
licenseheaders==0.8.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage[toml]==7.2.5 | ||
pytest==7.3.1 | ||
PyYAML==6.0.1 | ||
tenacity==8.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
import subprocess | ||
|
||
|
||
def test_sanity(): | ||
image_variable = "ROCK_CONTUR" | ||
entrypoint = "/contour" | ||
image = os.getenv(image_variable) | ||
assert image is not None, f"${image_variable} is not set" | ||
|
||
docker_run = subprocess.run( | ||
["docker", "run", "--rm", "--entrypoint", entrypoint, image, "--help"], | ||
|
||
capture_output=True, | ||
text=True, | ||
) | ||
assert "Contour Kubernetes ingress controller." in docker_run.stderr |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[tox] | ||
no_package = True | ||
skip_missing_interpreters = True | ||
env_list = format, lint, integration | ||
min_version = 4.0.0 | ||
|
||
[testenv] | ||
set_env = | ||
PYTHONBREAKPOINT=pdb.set_trace | ||
PY_COLORS=1 | ||
pass_env = | ||
PYTHONPATH | ||
|
||
[testenv:format] | ||
description = Apply coding style standards to code | ||
deps = -r {tox_root}/requirements-dev.txt | ||
commands = | ||
; licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root} | ||
isort {tox_root} --profile=black | ||
black {tox_root} | ||
|
||
[testenv:lint] | ||
description = Check code against coding style standards | ||
deps = -r {tox_root}/requirements-dev.txt | ||
commands = | ||
codespell {tox_root} --skip=".tox" | ||
flake8 {tox_root} | ||
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root} --dry | ||
isort {tox_root} --profile=black --check | ||
black {tox_root} --check --diff | ||
|
||
[testenv:sanity] | ||
description = Run integration tests | ||
deps = | ||
-r {tox_root}/requirements-test.txt | ||
commands = | ||
pytest -v \ | ||
--maxfail 1 \ | ||
--tb native \ | ||
--log-cli-level DEBUG \ | ||
--disable-warnings \ | ||
{posargs} \ | ||
{tox_root}/sanity | ||
pass_env = | ||
TEST_* | ||
ROCK_* | ||
|
||
[testenv: integration] | ||
allowlist_externals = | ||
echo | ||
commands = | ||
# TODO: Implement integration tests here | ||
echo "WARNING: This is a placeholder test - no test is implemented here." | ||
|
||
|
||
[flake8] | ||
max-line-length = 120 | ||
select = E,W,F,C,N | ||
ignore = W503 | ||
exclude = venv,.git,.tox,.tox_env,.venv,build,dist,*.egg_info | ||
show-source = true |