Merge ~arturo-seijas/charm-k8s-mattermost:add-charmcraft-file into charm-k8s-mattermost:master

Proposed by Arturo Enrique Seijas Fernández
Status: Merged
Approved by: Tom Haddon
Approved revision: 809aa6b005d509718854b278f0a5c525d5a391b4
Merged at revision: e6babfbe8eed1db1bec062d47fcf802e69eb0801
Proposed branch: ~arturo-seijas/charm-k8s-mattermost:add-charmcraft-file
Merge into: charm-k8s-mattermost:master
Diff against target: 59 lines (+13/-7)
4 files modified
Makefile (+1/-6)
charmcraft.yaml (+8/-0)
tests/unit/__init__.py (+3/-0)
tox.ini (+1/-1)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Review via email: mp+420303@code.launchpad.net

Commit message

Add charmcraft.yaml file

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

Two very minor comments

Revision history for this message
Arturo Enrique Seijas Fernández (arturo-seijas) wrote :

> Two very minor comments

Agreed. Fixed

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM, thx

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision e6babfbe8eed1db1bec062d47fcf802e69eb0801

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 1bf76cc..8eaa38b 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -6,9 +6,7 @@ lint: blacken
6 @echo "Running flake8"
7 @tox -e lint
8
9-# We actually use the build directory created by charmcraft,
10-# but the .charm file makes a much more convenient sentinel.
11-unittest: mattermost-k8s.charm
12+unittest: blacken lint
13 @tox -e unit
14
15 test: lint unittest
16@@ -17,7 +15,4 @@ clean:
17 @echo "Cleaning files"
18 @git clean -fXd
19
20-mattermost-k8s.charm: src/*.py requirements.txt
21- charmcraft build
22-
23 .PHONY: lint test unittest clean
24diff --git a/charmcraft.yaml b/charmcraft.yaml
25new file mode 100644
26index 0000000..07b8d79
27--- /dev/null
28+++ b/charmcraft.yaml
29@@ -0,0 +1,8 @@
30+type: "charm"
31+bases:
32+ - build-on:
33+ - name: "ubuntu"
34+ channel: "20.04"
35+ run-on:
36+ - name: "ubuntu"
37+ channel: "20.04"
38diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py
39new file mode 100644
40index 0000000..c5e3156
41--- /dev/null
42+++ b/tests/unit/__init__.py
43@@ -0,0 +1,3 @@
44+import ops.testing
45+
46+ops.testing.SIMULATE_CAN_CONNECT = True
47diff --git a/tox.ini b/tox.ini
48index 066c5a8..366d803 100644
49--- a/tox.ini
50+++ b/tox.ini
51@@ -18,7 +18,7 @@ setenv =
52 PYTHONPATH={toxinidir}/src:{toxinidir}/build/lib:{toxinidir}/build/venv
53 TZ=UTC
54
55-[testenv:functional]
56+[testenv:integration]
57 passenv =
58 HOME
59 JUJU_REPOSITORY

Subscribers

People subscribed via source and target branches