Merge ~cmisare/mojo/+git/mojo-specs:master into ~mojo-maintainers/mojo/+git/mojo-specs:master

Proposed by Colin Misare
Status: Merged
Approved by: Tom Haddon
Approved revision: 2a0b1db60ce8ce43a2333d983dde5aa259d47285
Merged at revision: c2b2853946d0baa4c9ebc3898a06e256986e5759
Proposed branch: ~cmisare/mojo/+git/mojo-specs:master
Merge into: ~mojo-maintainers/mojo/+git/mojo-specs:master
Diff against target: 96 lines (+42/-6)
7 files modified
charm-testing/ubuntu-advantage/applications.yaml (+0/-4)
charm-testing/ubuntu-advantage/install-hello (+1/-1)
charm-testing/ubuntu-advantage/manifest (+19/-1)
charm-testing/ubuntu-advantage/print-attachment (+3/-0)
charm-testing/ubuntu-advantage/print-hello (+3/-0)
charm-testing/ubuntu-advantage/relations.yaml (+13/-0)
charm-testing/ubuntu-advantage/reset-token (+3/-0)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Review via email: mp+398508@code.launchpad.net

Commit message

Some functional and troubleshooting additions

- Splitting out bundle steps to allow more time for both instance creation and ubuntu-advantage subscription attachment
- Print status between steps to allow some basic troubleshooting if subscription attachment fails or if package install fails
- Detach all ubuntu-advantage subscriptions at the end of a test to not explode the count of registered machines

Description of the change

Some functional and troubleshooting additions

- Splitting out bundle steps to allow more time for both instance creation and ubuntu-advantage subscription attachment
- Print status between steps to allow some basic troubleshooting if subscription attachment fails or if package install fails
- Detach all ubuntu-advantage subscriptions at the end of a test to not explode the count of registered machines

To post a comment you must log in.
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 :

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

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

Change successfully merged at revision c2b2853946d0baa4c9ebc3898a06e256986e5759

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charm-testing/ubuntu-advantage/bundle.yaml b/charm-testing/ubuntu-advantage/applications.yaml
2similarity index 90%
3rename from charm-testing/ubuntu-advantage/bundle.yaml
4rename to charm-testing/ubuntu-advantage/applications.yaml
5index e05b79b..01b5641 100644
6--- a/charm-testing/ubuntu-advantage/bundle.yaml
7+++ b/charm-testing/ubuntu-advantage/applications.yaml
8@@ -16,7 +16,3 @@ applications:
9 options:
10 ppa: ppa:ua-client/stable
11 token: include-file://{{local_dir}}/canonical-is-ua.key
12-relations:
13-- [xenial, ubuntu-advantage]
14-- [bionic, ubuntu-advantage]
15-- [focal, ubuntu-advantage]
16diff --git a/charm-testing/ubuntu-advantage/install-hello b/charm-testing/ubuntu-advantage/install-hello
17index 695bbf4..0d22268 100755
18--- a/charm-testing/ubuntu-advantage/install-hello
19+++ b/charm-testing/ubuntu-advantage/install-hello
20@@ -1,3 +1,3 @@
21 #!/usr/bin/env bash
22
23-juju run --all 'sudo apt install -y hello/$(lsb_release -s -c)-apps-security'
24+juju run --all 'sudo apt-get update && sudo apt-get install --yes hello/$(lsb_release -s -c)-apps-security'
25diff --git a/charm-testing/ubuntu-advantage/manifest b/charm-testing/ubuntu-advantage/manifest
26index 383cd6a..473618f 100644
27--- a/charm-testing/ubuntu-advantage/manifest
28+++ b/charm-testing/ubuntu-advantage/manifest
29@@ -1,2 +1,20 @@
30-bundle config=bundle.yaml
31+# Deploying charms (creating instances)
32+bundle config=applications.yaml
33+
34+# Deploying relations (performing ubuntu-advantage attachment)
35+bundle config=relations.yaml status-settle-wait=30
36+
37+# Printing attachment status
38+script config=print-attachment
39+
40+# Installing hello package from esm-apps repository
41 script config=install-hello
42+
43+# Printing package install status
44+script config=print-hello
45+
46+# Updating config to unset ubuntu-advantage token
47+script config=reset-token
48+
49+# Allowing instances time to detach
50+sleep config=120
51diff --git a/charm-testing/ubuntu-advantage/print-attachment b/charm-testing/ubuntu-advantage/print-attachment
52new file mode 100755
53index 0000000..c51ff38
54--- /dev/null
55+++ b/charm-testing/ubuntu-advantage/print-attachment
56@@ -0,0 +1,3 @@
57+#!/usr/bin/env bash
58+
59+juju run --all 'ubuntu-advantage status --all'
60diff --git a/charm-testing/ubuntu-advantage/print-hello b/charm-testing/ubuntu-advantage/print-hello
61new file mode 100755
62index 0000000..7baa7d6
63--- /dev/null
64+++ b/charm-testing/ubuntu-advantage/print-hello
65@@ -0,0 +1,3 @@
66+#!/usr/bin/env bash
67+
68+juju run --all 'dpkg --status hello'
69diff --git a/charm-testing/ubuntu-advantage/relations.yaml b/charm-testing/ubuntu-advantage/relations.yaml
70new file mode 100644
71index 0000000..673d80f
72--- /dev/null
73+++ b/charm-testing/ubuntu-advantage/relations.yaml
74@@ -0,0 +1,13 @@
75+applications:
76+ xenial:
77+ charm: cs:ubuntu
78+ bionic:
79+ charm: cs:ubuntu
80+ focal:
81+ charm: cs:ubuntu
82+ ubuntu-advantage:
83+ charm: cs:~ubuntu-advantage-charmers/ubuntu-advantage
84+relations:
85+- [xenial, ubuntu-advantage]
86+- [bionic, ubuntu-advantage]
87+- [focal, ubuntu-advantage]
88diff --git a/charm-testing/ubuntu-advantage/reset-token b/charm-testing/ubuntu-advantage/reset-token
89new file mode 100755
90index 0000000..b60edf3
91--- /dev/null
92+++ b/charm-testing/ubuntu-advantage/reset-token
93@@ -0,0 +1,3 @@
94+#!/usr/bin/env bash
95+
96+juju config ubuntu-advantage --reset token

Subscribers

People subscribed via source and target branches

to all changes: