~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to tests/test_motd.py

  • Committer: Balint Reczey
  • Author(s): Brian Murray
  • Date: 2019-09-11 15:29:50 UTC
  • Revision ID: balint.reczey@canonical.com-20190911152950-azcvu0oborg4t9xq
Tags: 3.192.26
data/apt_check.py: modify wording and output regarding ESM support.
(LP: #1842508)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
                        disabled_esm_updates=23),
24
24
            textwrap.dedent(
25
25
                """
26
 
                Extended Security Maintenance (ESM) is not enabled.
 
26
                UA Infrastructure Extended Security Maintenance (ESM) is not enabled.
27
27
 
28
28
                0 updates can be installed immediately.
29
29
                0 of these updates are security updates.
30
30
 
31
 
                Enable ESM to receive 23 additional security updates.
32
 
                See 'ua enable esm' or https://ubuntu.com/esm
 
31
                Enable UA Infrastructure ESM to receive 23 additional security updates.
 
32
                See https://ubuntu.com/esm or run: sudo ua status
33
33
                """).lstrip())
34
34
 
35
35
    def test_esm_disabled_security_esm_avail(self):
39
39
                        disabled_esm_updates=23),
40
40
            textwrap.dedent(
41
41
                """
42
 
                Extended Security Maintenance (ESM) is not enabled.
 
42
                UA Infrastructure Extended Security Maintenance (ESM) is not enabled.
43
43
 
44
44
                15 updates can be installed immediately.
45
45
                7 of these updates are security updates.
 
46
                To see these additional updates run: apt list --upgradable
46
47
 
47
 
                Enable ESM to receive 23 additional security updates.
48
 
                See 'ua enable esm' or https://ubuntu.com/esm
 
48
                Enable UA Infrastructure ESM to receive 23 additional security updates.
 
49
                See https://ubuntu.com/esm or run: sudo ua status
49
50
                """).lstrip())
50
51
 
51
52
    def test_esm_disabled_security_no_esm_avail(self):
55
56
                        disabled_esm_updates=0),
56
57
            textwrap.dedent(
57
58
                """
58
 
                Extended Security Maintenance (ESM) is not enabled.
 
59
                UA Infrastructure Extended Security Maintenance (ESM) is not enabled.
59
60
 
60
61
                15 updates can be installed immediately.
61
62
                7 of these updates are security updates.
 
63
                To see these additional updates run: apt list --upgradable
62
64
 
63
 
                Enable ESM to receive additional future security updates.
64
 
                See 'ua enable esm' or https://ubuntu.com/esm
 
65
                Enable UA Infrastructure ESM to receive additional future security updates.
 
66
                See https://ubuntu.com/esm or run: sudo ua status
65
67
                """).lstrip())
66
68
 
67
69
    def test_esm_disabled_nosecurity(self):
71
73
                        disabled_esm_updates=0),
72
74
            textwrap.dedent(
73
75
                """
74
 
                Extended Security Maintenance (ESM) is not enabled.
 
76
                UA Infrastructure Extended Security Maintenance (ESM) is not enabled.
75
77
 
76
78
                15 updates can be installed immediately.
77
79
                0 of these updates are security updates.
 
80
                To see these additional updates run: apt list --upgradable
78
81
 
79
 
                Enable ESM to receive additional future security updates.
80
 
                See 'ua enable esm' or https://ubuntu.com/esm
 
82
                Enable UA Infrastructure ESM to receive additional future security updates.
 
83
                See https://ubuntu.com/esm or run: sudo ua status
81
84
                """).lstrip())
82
85
 
83
86
    def test_esm_disabled_noupdates(self):
87
90
                        disabled_esm_updates=0),
88
91
            textwrap.dedent(
89
92
                """
90
 
                Extended Security Maintenance (ESM) is not enabled.
 
93
                UA Infrastructure Extended Security Maintenance (ESM) is not enabled.
91
94
 
92
95
                0 updates can be installed immediately.
93
96
                0 of these updates are security updates.
94
97
 
95
 
                Enable ESM to receive additional future security updates.
96
 
                See 'ua enable esm' or https://ubuntu.com/esm
 
98
                Enable UA Infrastructure ESM to receive additional future security updates.
 
99
                See https://ubuntu.com/esm or run: sudo ua status
97
100
                """).lstrip())
98
101
 
99
102
    def test_esm_enabled_nosecurity(self):
103
106
                        disabled_esm_updates=0),
104
107
            textwrap.dedent(
105
108
                """
106
 
                Extended Security Maintenance (ESM) is enabled.
 
109
                UA Infrastructure Extended Security Maintenance (ESM) is enabled.
107
110
 
108
111
                35 updates can be installed immediately.
109
 
                13 of these updates are provided through ESM.
 
112
                13 of these updates are provided through UA Infrastructure ESM.
110
113
                0 of these updates are security updates.
 
114
                To see these additional updates run: apt list --upgradable
111
115
                """).lstrip())
112
116
 
113
117
    def test_esm_enabled_somesecurity(self):
117
121
                        disabled_esm_updates=0),
118
122
            textwrap.dedent(
119
123
                """
120
 
                Extended Security Maintenance (ESM) is enabled.
 
124
                UA Infrastructure Extended Security Maintenance (ESM) is enabled.
121
125
 
122
126
                47 updates can be installed immediately.
123
 
                13 of these updates are provided through ESM.
 
127
                13 of these updates are provided through UA Infrastructure ESM.
124
128
                7 of these updates are security updates.
 
129
                To see these additional updates run: apt list --upgradable
125
130
                """).lstrip())
126
131
 
127
132
    def test_esm_enabled_noupdates(self):
131
136
                        disabled_esm_updates=0),
132
137
            textwrap.dedent(
133
138
                """
134
 
                Extended Security Maintenance (ESM) is enabled.
 
139
                UA Infrastructure Extended Security Maintenance (ESM) is enabled.
135
140
 
136
141
                0 updates can be installed immediately.
137
142
                0 of these updates are security updates.