Merge ~xavpaice/charm-etckeeper:add_focal into charm-etckeeper:master

Proposed by Xav Paice
Status: Merged
Approved by: Paul Goins
Approved revision: a81b15ec179de71ae45865eb077ca71f1bf0feba
Merge reported by: Paul Goins
Merged at revision: a81b15ec179de71ae45865eb077ca71f1bf0feba
Proposed branch: ~xavpaice/charm-etckeeper:add_focal
Merge into: charm-etckeeper:master
Diff against target: 101 lines (+11/-11)
5 files modified
Makefile (+4/-4)
metadata.yaml (+1/-0)
tests/functional/conftest.py (+1/-1)
tests/functional/test_deploy.py (+3/-3)
tox.ini (+2/-3)
Reviewer Review Type Date Requested Status
Paul Goins Approve
Celia Wang Approve
Review via email: mp+383757@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Celia Wang (ziyiwang) wrote :

LGTM.

review: Approve
Revision history for this message
Paul Goins (vultaire) wrote :

Some feedback regarding CHARM_BUILD_DIR changes.

review: Needs Fixing
Revision history for this message
Xav Paice (xavpaice) wrote :

Thanks for the feedback - I've made the update to remove the deprecated environment, and also updated the functional tests to include Focal.

Revision history for this message
Paul Goins (vultaire) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index ad784db..3a32bc8 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -29,7 +29,7 @@ submodules:
6
7 lint:
8 @echo "Running flake8"
9- @-tox -e lint
10+ @tox -e lint
11
12 test: lint unittest functional
13
14@@ -41,10 +41,10 @@ functional: build
15 @$(BUILD_VARS) tox -e functional
16
17 build:
18- @echo "Building charm to base directory $(JUJU_REPOSITORY)"
19+ @echo "Building charm to base directory $(CHARM_BUILD_DIR)"
20 @-git describe --tags > ./repo-info
21- @LAYER_PATH=./layers INTERFACE_PATH=./interfaces TERM=linux \
22- JUJU_REPOSITORY=$(JUJU_REPOSITORY) charm build . --force
23+ @CHARM_LAYERS_DIR=./layers CHARM_INTERFACES_DIR=./interfaces TERM=linux \
24+ CHARM_BUILD_DIR=$(CHARM_BUILD_DIR) charm build . --force
25
26 release: clean build
27 @echo "Charm is built at $(JUJU_REPOSITORY)/builds"
28diff --git a/metadata.yaml b/metadata.yaml
29index d86a36b..4c252b3 100644
30--- a/metadata.yaml
31+++ b/metadata.yaml
32@@ -8,6 +8,7 @@ tags:
33 - ops
34 subordinate: true
35 series:
36+ - focal
37 - bionic
38 - xenial
39 requires:
40diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py
41index 616f6c1..104791c 100644
42--- a/tests/functional/conftest.py
43+++ b/tests/functional/conftest.py
44@@ -36,7 +36,7 @@ def event_loop():
45 async def controller():
46 """Connect to the current controller."""
47 _controller = Controller()
48- await _controller.connect_current()
49+ await _controller.connect()
50 yield _controller
51 await _controller.disconnect()
52
53diff --git a/tests/functional/test_deploy.py b/tests/functional/test_deploy.py
54index 3684137..3943b20 100644
55--- a/tests/functional/test_deploy.py
56+++ b/tests/functional/test_deploy.py
57@@ -7,14 +7,14 @@ import stat
58 # Treat all tests as coroutines
59 pytestmark = pytest.mark.asyncio
60
61-juju_repository = os.getenv("JUJU_REPOSITORY", ".").rstrip("/")
62+charm_build_dir = os.getenv("CHARM_BUILD_DIR", ".").rstrip("/")
63 series = [
64 "xenial",
65 "bionic",
66- pytest.param("eoan", marks=pytest.mark.xfail(reason="canary")),
67+ "focal",
68 ]
69 sources = [
70- ("local", "{}/builds/etckeeper".format(juju_repository)),
71+ ("local", "{}/etckeeper".format(charm_build_dir)),
72 # ('jujucharms', 'cs:...'),
73 ]
74
75diff --git a/tox.ini b/tox.ini
76index b5a7697..94527af 100644
77--- a/tox.ini
78+++ b/tox.ini
79@@ -28,7 +28,7 @@ setenv = PYTHONPATH={toxinidir}/lib
80 [testenv:functional]
81 passenv =
82 HOME
83- JUJU_REPOSITORY
84+ CHARM_BUILD_DIR
85 PATH
86 PYTEST_MODEL
87 PYTEST_KEEP_MODEL
88@@ -46,12 +46,11 @@ deps = -r{toxinidir}/tests/functional/requirements.txt
89 -r{toxinidir}/requirements.txt
90
91 [testenv:lint]
92-commands = flake8 --format=html --htmldir=report/lint/ --tee
93+commands = flake8
94 deps =
95 flake8
96 flake8-colors
97 flake8-docstrings
98- flake8-html
99 pep8-naming
100
101 [testenv:lintjunit]

Subscribers

People subscribed via source and target branches