Merge lp:~osomon/notes-app/manually-create-db into lp:notes-app
- manually-create-db
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | Olivier Tilloy |
Proposed branch: | lp:~osomon/notes-app/manually-create-db |
Merge into: | lp:notes-app |
Diff against target: |
342 lines (+51/-106) 7 files modified
tests/autopilot/notes_app/tests/__init__.py (+28/-50) tests/autopilot/notes_app/tests/test_create.py (+3/-9) tests/autopilot/notes_app/tests/test_delete.py (+3/-9) tests/autopilot/notes_app/tests/test_expand_collapse.py (+3/-9) tests/autopilot/notes_app/tests/test_images.py (+3/-9) tests/autopilot/notes_app/tests/test_parts.py (+3/-3) tests/autopilot/notes_app/tests/test_quit.py (+8/-17) |
To merge this branch: | bzr merge lp:~osomon/notes-app/manually-create-db |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Tilloy | Disapprove | ||
PS Jenkins bot | continuous-integration | Needs Fixing | |
Review via email: mp+193097@code.launchpad.net |
Commit message
Manually create the notes database before starting tests,
instead of launching the app, quitting it, and launching it again.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:219
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:219
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:219
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:219
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:219
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
Unmerged revisions
- 219. By Olivier Tilloy
-
Remove the DatabaseMixin helper class.
- 218. By Olivier Tilloy
-
Manually create the notes database before starting tests,
instead of launching the app, quitting it, and launching it again.
Preview Diff
1 | === modified file 'tests/autopilot/notes_app/tests/__init__.py' | |||
2 | --- tests/autopilot/notes_app/tests/__init__.py 2013-10-08 21:50:29 +0000 | |||
3 | +++ tests/autopilot/notes_app/tests/__init__.py 2013-10-29 16:46:19 +0000 | |||
4 | @@ -8,10 +8,13 @@ | |||
5 | 8 | """notes-app autopilot tests.""" | 8 | """notes-app autopilot tests.""" |
6 | 9 | 9 | ||
7 | 10 | import BaseHTTPServer | 10 | import BaseHTTPServer |
8 | 11 | import base64 | ||
9 | 12 | import glob | ||
10 | 13 | import md5 | ||
11 | 14 | import os | ||
12 | 11 | import os.path | 15 | import os.path |
14 | 12 | import glob | 16 | import sqlite3 |
15 | 13 | import threading | 17 | import threading |
16 | 14 | import base64 | ||
17 | 15 | 18 | ||
18 | 16 | from autopilot.input import Mouse, Touch, Pointer | 19 | from autopilot.input import Mouse, Touch, Pointer |
19 | 17 | from autopilot.matchers import Eventually | 20 | from autopilot.matchers import Eventually |
20 | @@ -82,17 +85,29 @@ | |||
21 | 82 | "com.ubuntu.notes", | 85 | "com.ubuntu.notes", |
22 | 83 | emulator_base=UbuntuUIToolkitEmulatorBase) | 86 | emulator_base=UbuntuUIToolkitEmulatorBase) |
23 | 84 | 87 | ||
35 | 85 | def launch_and_quit_app(self): | 88 | def ensure_db(self): |
36 | 86 | self.launch_app() | 89 | path = os.path.expanduser("~/.local/share/com.ubuntu.notes/Databases") |
37 | 87 | self.main_window.visible.wait_for(True) | 90 | if not os.path.exists(path): |
38 | 88 | 91 | os.makedirs(path) | |
39 | 89 | # When calling launch_app an instance of the spawned process | 92 | filepath = os.path.join(path, md5.md5("notes").hexdigest()) |
40 | 90 | # control object will be stored in self.app.process, and a cleanup | 93 | ini = filepath + ".ini" |
41 | 91 | # handler will be registered that essentially kills the process. | 94 | if not os.path.exists(ini): |
42 | 92 | # Therefore, by triggering the cleanup handler here we're killing the | 95 | with open(ini, "w") as f: |
43 | 93 | # process and removing the handler, which allows a clean launch of | 96 | f.write("""[General] |
44 | 94 | # the process during regular test setup. | 97 | Description=Notes database |
45 | 95 | self.doCleanups() | 98 | Driver=QSQLITE |
46 | 99 | EstimatedSize=3145728 | ||
47 | 100 | Name=notes | ||
48 | 101 | Version=1 | ||
49 | 102 | """) | ||
50 | 103 | sql = filepath + ".sqlite" | ||
51 | 104 | connection = sqlite3.connect(sql) | ||
52 | 105 | cursor = connection.cursor() | ||
53 | 106 | cursor.execute("CREATE TABLE IF NOT EXISTS notes " | ||
54 | 107 | "(id INTEGER PRIMARY KEY, date DATETIME, note TEXT)") | ||
55 | 108 | connection.commit() | ||
56 | 109 | connection.close() | ||
57 | 110 | return sql | ||
58 | 96 | 111 | ||
59 | 97 | def assert_osk_eventually_shown(self): | 112 | def assert_osk_eventually_shown(self): |
60 | 98 | if model() != 'Desktop': | 113 | if model() != 'Desktop': |
61 | @@ -176,40 +191,3 @@ | |||
62 | 176 | def tearDown(self): | 191 | def tearDown(self): |
63 | 177 | super(NotesTestCaseBaseWithHTTPServer, self).tearDown() | 192 | super(NotesTestCaseBaseWithHTTPServer, self).tearDown() |
64 | 178 | self.server.shutdown() | 193 | self.server.shutdown() |
65 | 179 | |||
66 | 180 | |||
67 | 181 | class DatabaseMixin(object): | ||
68 | 182 | |||
69 | 183 | """ | ||
70 | 184 | Helper functions for dealing with sqlite databases | ||
71 | 185 | """ | ||
72 | 186 | |||
73 | 187 | def _get_db_path(self): | ||
74 | 188 | db_path_list = [ | ||
75 | 189 | "~/.local/share/com.ubuntu.notes/Databases", | ||
76 | 190 | "~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/" | ||
77 | 191 | "Databases/"] | ||
78 | 192 | for path in db_path_list: | ||
79 | 193 | path = os.path.expanduser(path) | ||
80 | 194 | if os.path.exists(path): | ||
81 | 195 | return path | ||
82 | 196 | return None | ||
83 | 197 | |||
84 | 198 | def find_db(self): | ||
85 | 199 | dbs_path = self._get_db_path() | ||
86 | 200 | if not dbs_path: | ||
87 | 201 | return None | ||
88 | 202 | files = [f for f in os.listdir(dbs_path) | ||
89 | 203 | if os.path.splitext(f)[1] == ".ini"] | ||
90 | 204 | for f in files: | ||
91 | 205 | ini_path = os.path.join(dbs_path, f) | ||
92 | 206 | with open(ini_path) as ini: | ||
93 | 207 | for line in ini: | ||
94 | 208 | if "=" in line: | ||
95 | 209 | key, val = line.strip().split("=") | ||
96 | 210 | if key == "Name" and val == "notes": | ||
97 | 211 | try: | ||
98 | 212 | return ini_path.replace(".ini", ".sqlite") | ||
99 | 213 | except OSError: | ||
100 | 214 | pass | ||
101 | 215 | return None | ||
102 | 216 | 194 | ||
103 | === modified file 'tests/autopilot/notes_app/tests/test_create.py' | |||
104 | --- tests/autopilot/notes_app/tests/test_create.py 2013-09-27 14:42:07 +0000 | |||
105 | +++ tests/autopilot/notes_app/tests/test_create.py 2013-10-29 16:46:19 +0000 | |||
106 | @@ -12,12 +12,12 @@ | |||
107 | 12 | from testtools.matchers import Equals | 12 | from testtools.matchers import Equals |
108 | 13 | from autopilot.matchers import Eventually | 13 | from autopilot.matchers import Eventually |
109 | 14 | 14 | ||
111 | 15 | from notes_app.tests import NotesAppTestCase, DatabaseMixin | 15 | from notes_app.tests import NotesAppTestCase |
112 | 16 | 16 | ||
113 | 17 | import os | 17 | import os |
114 | 18 | 18 | ||
115 | 19 | 19 | ||
117 | 20 | class TestCreate(NotesAppTestCase, DatabaseMixin): | 20 | class TestCreate(NotesAppTestCase): |
118 | 21 | """Tests creating notes""" | 21 | """Tests creating notes""" |
119 | 22 | 22 | ||
120 | 23 | """ This is needed to wait for the application to start. | 23 | """ This is needed to wait for the application to start. |
121 | @@ -29,13 +29,7 @@ | |||
122 | 29 | super(TestCreate, self).setUp() | 29 | super(TestCreate, self).setUp() |
123 | 30 | 30 | ||
124 | 31 | def clean_db(self): | 31 | def clean_db(self): |
132 | 32 | path = self.find_db() | 32 | path = self.ensure_db() |
126 | 33 | if path is None: | ||
127 | 34 | self.launch_and_quit_app() | ||
128 | 35 | path = self.find_db() | ||
129 | 36 | if path is None: | ||
130 | 37 | self.assertNotEquals(path, None) | ||
131 | 38 | |||
133 | 39 | try: | 33 | try: |
134 | 40 | os.remove(path) | 34 | os.remove(path) |
135 | 41 | except OSError: | 35 | except OSError: |
136 | 42 | 36 | ||
137 | === modified file 'tests/autopilot/notes_app/tests/test_delete.py' | |||
138 | --- tests/autopilot/notes_app/tests/test_delete.py 2013-10-10 09:30:43 +0000 | |||
139 | +++ tests/autopilot/notes_app/tests/test_delete.py 2013-10-29 16:46:19 +0000 | |||
140 | @@ -12,12 +12,12 @@ | |||
141 | 12 | from testtools.matchers import Equals | 12 | from testtools.matchers import Equals |
142 | 13 | from autopilot.matchers import Eventually | 13 | from autopilot.matchers import Eventually |
143 | 14 | 14 | ||
145 | 15 | from notes_app.tests import NotesAppTestCase, DatabaseMixin | 15 | from notes_app.tests import NotesAppTestCase |
146 | 16 | 16 | ||
147 | 17 | import sqlite3 | 17 | import sqlite3 |
148 | 18 | 18 | ||
149 | 19 | 19 | ||
151 | 20 | class TestDelete(NotesAppTestCase, DatabaseMixin): | 20 | class TestDelete(NotesAppTestCase): |
152 | 21 | """Tests deleting notes""" | 21 | """Tests deleting notes""" |
153 | 22 | 22 | ||
154 | 23 | def setUp(self): | 23 | def setUp(self): |
155 | @@ -30,13 +30,7 @@ | |||
156 | 30 | {"content":"This is a note.","type":"text"} | 30 | {"content":"This is a note.","type":"text"} |
157 | 31 | ]}""" | 31 | ]}""" |
158 | 32 | 32 | ||
166 | 33 | path = self.find_db() | 33 | path = self.ensure_db() |
160 | 34 | if path is None: | ||
161 | 35 | self.launch_and_quit_app() | ||
162 | 36 | path = self.find_db() | ||
163 | 37 | if path is None: | ||
164 | 38 | self.assertNotEquals(path, None) | ||
165 | 39 | |||
167 | 40 | conn = sqlite3.connect(path) | 34 | conn = sqlite3.connect(path) |
168 | 41 | cursor = conn.cursor() | 35 | cursor = conn.cursor() |
169 | 42 | cursor.execute("DELETE FROM notes") | 36 | cursor.execute("DELETE FROM notes") |
170 | 43 | 37 | ||
171 | === modified file 'tests/autopilot/notes_app/tests/test_expand_collapse.py' | |||
172 | --- tests/autopilot/notes_app/tests/test_expand_collapse.py 2013-10-01 07:42:44 +0000 | |||
173 | +++ tests/autopilot/notes_app/tests/test_expand_collapse.py 2013-10-29 16:46:19 +0000 | |||
174 | @@ -12,12 +12,12 @@ | |||
175 | 12 | from testtools.matchers import Equals | 12 | from testtools.matchers import Equals |
176 | 13 | from autopilot.matchers import Eventually | 13 | from autopilot.matchers import Eventually |
177 | 14 | 14 | ||
179 | 15 | from notes_app.tests import NotesAppTestCase, DatabaseMixin | 15 | from notes_app.tests import NotesAppTestCase |
180 | 16 | 16 | ||
181 | 17 | import sqlite3 | 17 | import sqlite3 |
182 | 18 | 18 | ||
183 | 19 | 19 | ||
185 | 20 | class TestExpandCollapse(NotesAppTestCase, DatabaseMixin): | 20 | class TestExpandCollapse(NotesAppTestCase): |
186 | 21 | """Tests deleting notes""" | 21 | """Tests deleting notes""" |
187 | 22 | 22 | ||
188 | 23 | def setUp(self): | 23 | def setUp(self): |
189 | @@ -35,13 +35,7 @@ | |||
190 | 35 | ]}""" | 35 | ]}""" |
191 | 36 | ] | 36 | ] |
192 | 37 | 37 | ||
200 | 38 | path = self.find_db() | 38 | path = self.ensure_db() |
194 | 39 | if path is None: | ||
195 | 40 | self.launch_and_quit_app() | ||
196 | 41 | path = self.find_db() | ||
197 | 42 | if path is None: | ||
198 | 43 | self.assertNotEquals(path, None) | ||
199 | 44 | |||
201 | 45 | conn = sqlite3.connect(path) | 39 | conn = sqlite3.connect(path) |
202 | 46 | cursor = conn.cursor() | 40 | cursor = conn.cursor() |
203 | 47 | cursor.execute("DELETE FROM notes") | 41 | cursor.execute("DELETE FROM notes") |
204 | 48 | 42 | ||
205 | === modified file 'tests/autopilot/notes_app/tests/test_images.py' | |||
206 | --- tests/autopilot/notes_app/tests/test_images.py 2013-10-07 10:10:40 +0000 | |||
207 | +++ tests/autopilot/notes_app/tests/test_images.py 2013-10-29 16:46:19 +0000 | |||
208 | @@ -12,12 +12,12 @@ | |||
209 | 12 | from testtools.matchers import Equals | 12 | from testtools.matchers import Equals |
210 | 13 | from autopilot.matchers import Eventually | 13 | from autopilot.matchers import Eventually |
211 | 14 | 14 | ||
213 | 15 | from notes_app.tests import NotesTestCaseBaseWithHTTPServer, DatabaseMixin | 15 | from notes_app.tests import NotesTestCaseBaseWithHTTPServer |
214 | 16 | 16 | ||
215 | 17 | import sqlite3 | 17 | import sqlite3 |
216 | 18 | 18 | ||
217 | 19 | 19 | ||
219 | 20 | class BaseForTestImages(NotesTestCaseBaseWithHTTPServer, DatabaseMixin): | 20 | class BaseForTestImages(NotesTestCaseBaseWithHTTPServer): |
220 | 21 | def setUp(self): | 21 | def setUp(self): |
221 | 22 | self.setup_db(self.IMAGE) | 22 | self.setup_db(self.IMAGE) |
222 | 23 | super(BaseForTestImages, self).setUp() | 23 | super(BaseForTestImages, self).setUp() |
223 | @@ -27,13 +27,7 @@ | |||
224 | 27 | {"content":"http://localhost:8129/""" + image + """","type":"image"} | 27 | {"content":"http://localhost:8129/""" + image + """","type":"image"} |
225 | 28 | ]}""" | 28 | ]}""" |
226 | 29 | 29 | ||
234 | 30 | path = self.find_db() | 30 | path = self.ensure_db() |
228 | 31 | if path is None: | ||
229 | 32 | self.launch_and_quit_app() | ||
230 | 33 | path = self.find_db() | ||
231 | 34 | if path is None: | ||
232 | 35 | self.assertNotEquals(path, None) | ||
233 | 36 | |||
235 | 37 | conn = sqlite3.connect(path) | 31 | conn = sqlite3.connect(path) |
236 | 38 | cursor = conn.cursor() | 32 | cursor = conn.cursor() |
237 | 39 | cursor.execute("DELETE FROM notes") | 33 | cursor.execute("DELETE FROM notes") |
238 | 40 | 34 | ||
239 | === modified file 'tests/autopilot/notes_app/tests/test_parts.py' | |||
240 | --- tests/autopilot/notes_app/tests/test_parts.py 2013-10-07 10:21:27 +0000 | |||
241 | +++ tests/autopilot/notes_app/tests/test_parts.py 2013-10-29 16:46:19 +0000 | |||
242 | @@ -13,12 +13,12 @@ | |||
243 | 13 | from autopilot.matchers import Eventually | 13 | from autopilot.matchers import Eventually |
244 | 14 | from autopilot.platform import model | 14 | from autopilot.platform import model |
245 | 15 | 15 | ||
247 | 16 | from notes_app.tests import NotesTestCaseBaseWithHTTPServer, DatabaseMixin | 16 | from notes_app.tests import NotesTestCaseBaseWithHTTPServer |
248 | 17 | 17 | ||
249 | 18 | import sqlite3 | 18 | import sqlite3 |
250 | 19 | 19 | ||
251 | 20 | 20 | ||
253 | 21 | class TestFocus(NotesTestCaseBaseWithHTTPServer, DatabaseMixin): | 21 | class TestFocus(NotesTestCaseBaseWithHTTPServer): |
254 | 22 | """Tests focusing notes""" | 22 | """Tests focusing notes""" |
255 | 23 | 23 | ||
256 | 24 | """ This is needed to wait for the application to start. | 24 | """ This is needed to wait for the application to start. |
257 | @@ -34,7 +34,7 @@ | |||
258 | 34 | {"content":"http://localhost:8129/image.png","type":"image"} | 34 | {"content":"http://localhost:8129/image.png","type":"image"} |
259 | 35 | ]}""" | 35 | ]}""" |
260 | 36 | 36 | ||
262 | 37 | path = self.find_db() | 37 | path = self.ensure_db() |
263 | 38 | conn = sqlite3.connect(path) | 38 | conn = sqlite3.connect(path) |
264 | 39 | cursor = conn.cursor() | 39 | cursor = conn.cursor() |
265 | 40 | cursor.execute("DELETE FROM notes") | 40 | cursor.execute("DELETE FROM notes") |
266 | 41 | 41 | ||
267 | === modified file 'tests/autopilot/notes_app/tests/test_quit.py' | |||
268 | --- tests/autopilot/notes_app/tests/test_quit.py 2013-10-01 07:42:44 +0000 | |||
269 | +++ tests/autopilot/notes_app/tests/test_quit.py 2013-10-29 16:46:19 +0000 | |||
270 | @@ -13,7 +13,7 @@ | |||
271 | 13 | from autopilot.matchers import Eventually | 13 | from autopilot.matchers import Eventually |
272 | 14 | from autopilot.introspection.dbus import StateNotFoundError | 14 | from autopilot.introspection.dbus import StateNotFoundError |
273 | 15 | 15 | ||
275 | 16 | from notes_app.tests import NotesAppTestCase, DatabaseMixin | 16 | from notes_app.tests import NotesAppTestCase |
276 | 17 | 17 | ||
277 | 18 | import sqlite3 | 18 | import sqlite3 |
278 | 19 | import json | 19 | import json |
279 | @@ -47,17 +47,8 @@ | |||
280 | 47 | return True | 47 | return True |
281 | 48 | return False | 48 | return False |
282 | 49 | 49 | ||
294 | 50 | def get_db_path(self): | 50 | |
295 | 51 | path = self.find_db() | 51 | class TestQuit(NotesAppTestCase, UtilsMixin): |
285 | 52 | if path is None: | ||
286 | 53 | self.launch_and_quit_app() | ||
287 | 54 | path = self.find_db() | ||
288 | 55 | if path is None: | ||
289 | 56 | self.assertNotEquals(path, None) | ||
290 | 57 | return path | ||
291 | 58 | |||
292 | 59 | |||
293 | 60 | class TestQuit(NotesAppTestCase, DatabaseMixin, UtilsMixin): | ||
296 | 61 | """Tests save on quit""" | 52 | """Tests save on quit""" |
297 | 62 | 53 | ||
298 | 63 | """ This is needed to wait for the application to start. | 54 | """ This is needed to wait for the application to start. |
299 | @@ -72,7 +63,7 @@ | |||
300 | 72 | {"content":"foobar","type":"text"} | 63 | {"content":"foobar","type":"text"} |
301 | 73 | ]}""" | 64 | ]}""" |
302 | 74 | 65 | ||
304 | 75 | path = self.get_db_path() | 66 | path = self.ensure_db() |
305 | 76 | conn = sqlite3.connect(path) | 67 | conn = sqlite3.connect(path) |
306 | 77 | cursor = conn.cursor() | 68 | cursor = conn.cursor() |
307 | 78 | cursor.execute("DELETE FROM notes") | 69 | cursor.execute("DELETE FROM notes") |
308 | @@ -92,7 +83,7 @@ | |||
309 | 92 | 83 | ||
310 | 93 | self.assertThat(self.app_has_quit, Eventually(Equals(True))) | 84 | self.assertThat(self.app_has_quit, Eventually(Equals(True))) |
311 | 94 | 85 | ||
313 | 95 | path = self.find_db() | 86 | path = self.ensure_db() |
314 | 96 | conn = sqlite3.connect(path) | 87 | conn = sqlite3.connect(path) |
315 | 97 | cursor = conn.cursor() | 88 | cursor = conn.cursor() |
316 | 98 | 89 | ||
317 | @@ -105,7 +96,7 @@ | |||
318 | 105 | self.assertEquals(data["elements"][0]["content"], "foobarxxx") | 96 | self.assertEquals(data["elements"][0]["content"], "foobarxxx") |
319 | 106 | 97 | ||
320 | 107 | 98 | ||
322 | 108 | class TestQuitNoNote(NotesAppTestCase, DatabaseMixin, UtilsMixin): | 99 | class TestQuitNoNote(NotesAppTestCase, UtilsMixin): |
323 | 109 | """Tests save on quit with no notes""" | 100 | """Tests save on quit with no notes""" |
324 | 110 | 101 | ||
325 | 111 | """ This is needed to wait for the application to start. | 102 | """ This is needed to wait for the application to start. |
326 | @@ -116,7 +107,7 @@ | |||
327 | 116 | super(TestQuitNoNote, self).setUp() | 107 | super(TestQuitNoNote, self).setUp() |
328 | 117 | 108 | ||
329 | 118 | def setup_db(self): | 109 | def setup_db(self): |
331 | 119 | path = self.get_db_path() | 110 | path = self.ensure_db() |
332 | 120 | conn = sqlite3.connect(path) | 111 | conn = sqlite3.connect(path) |
333 | 121 | cursor = conn.cursor() | 112 | cursor = conn.cursor() |
334 | 122 | cursor.execute("DELETE FROM notes") | 113 | cursor.execute("DELETE FROM notes") |
335 | @@ -134,7 +125,7 @@ | |||
336 | 134 | 125 | ||
337 | 135 | self.assertThat(self.app_has_quit, Eventually(Equals(True))) | 126 | self.assertThat(self.app_has_quit, Eventually(Equals(True))) |
338 | 136 | 127 | ||
340 | 137 | path = self.find_db() | 128 | path = self.ensure_db() |
341 | 138 | conn = sqlite3.connect(path) | 129 | conn = sqlite3.connect(path) |
342 | 139 | cursor = conn.cursor() | 130 | cursor = conn.cursor() |
343 | 140 | 131 |
FAILED: Continuous integration, rev:219 jenkins. qa.ubuntu. com/job/ notes-app- ci/222/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty/ 159 jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty- touch/153/ console jenkins. qa.ubuntu. com/job/ notes-app- trusty- amd64-ci/ 4 jenkins. qa.ubuntu. com/job/ notes-app- trusty- armhf-ci/ 4 jenkins. qa.ubuntu. com/job/ notes-app- trusty- armhf-ci/ 4/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ notes-app- trusty- i386-ci/ 4 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-trusty/ 150 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/159 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/159/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/153 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/153/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- maguro/ 2777/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/2827/ console 10.97.0. 26:8080/ job/touch- flash-device/ 594 10.97.0. 26:8080/ job/touch- flash-device/ 593
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 10.97.0. 26:8080/ job/notes- app-ci/ 222/rebuild
http://