Maciej Borzecki
25c9e7de42
daemon: fix notices API tests on non Ubuntu (#13823)
Snap mount location is hardcoded, but os-release is not mocked, so host paths
are assumed.
Failed like so:
```
----------------------------------------------------------------------
FAIL: api_notices_test.go:947: noticesSuite.TestAddNoticesSnapCmdReexecCore
api_notices_test.go:948:
s.testAddNoticesSnapCmd(c, "/snap/core/12/usr/bin/snap", false)
api_base_test.go:648:
c.Assert(rsp.Type, check.Equals, daemon.ResponseTypeSync, check.Commentf("expected sync resp: %#v, result: %+v", rsp, rsp.Result))
... obtained daemon.ResponseType = "error"
... expected daemon.ResponseType = "sync"
... expected sync resp: &daemon.respJSON{Type:"error", Status:403, StatusText:"", Result:(*daemon.errorResult)(0xc0007911d0), Change:"", Sources:[]string(nil), SuggestedCurrency:"", WarningTimestamp:<nil>, WarningCount:0, Maintenance:(*daemon.errorResult)(nil)}, result: &{Message:only snap command can record notices Kind:login-required Value:<nil>}
... Difference:
... "error" != "sync"
```
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
2024-04-12 16:04:58 +02:00
..
2024-04-03 13:26:36 +02:00
2024-04-10 10:27:07 +02:00
2024-04-02 14:32:49 -05:00
2024-04-02 14:32:49 -05:00
2023-12-02 09:40:31 +00:00
2023-07-20 18:03:32 +02:00
2024-04-11 12:45:48 +02:00
2024-04-11 12:45:48 +02:00
2024-03-07 14:57:35 +00:00
2024-02-26 17:42:11 +00:00
2022-08-16 20:40:54 +02:00
2023-02-09 16:02:40 +00:00
2024-04-03 23:23:24 +02:00
2021-05-19 18:09:06 +02:00
2021-06-03 13:49:26 +02:00
2023-04-06 10:02:09 +02:00
2021-06-10 13:15:35 +02:00
2021-06-03 13:49:26 +02:00
2022-05-30 14:08:49 +01:00
2022-05-20 10:07:29 +01:00
2021-09-02 17:44:34 +01:00
2021-06-03 13:49:26 +02:00
2022-06-21 15:49:01 +01:00
2024-04-03 23:23:24 +02:00
2021-09-02 17:44:34 +01:00
2022-05-20 10:07:29 +01:00
2021-06-03 13:49:26 +02:00
2022-06-21 15:49:01 +01:00
2024-02-08 15:34:34 +01:00
2024-04-03 23:23:24 +02:00
2022-05-20 10:07:29 +01:00
2023-12-02 09:40:31 +00:00
2023-04-06 10:02:09 +02:00
2024-04-02 14:32:49 -05:00
2024-04-02 14:32:49 -05:00
2023-09-26 11:38:46 +01:00
2022-05-20 10:07:29 +01:00
2022-03-14 18:22:34 +01:00
2022-05-20 10:07:29 +01:00
2024-02-02 11:41:55 +02:00
2024-03-10 22:35:04 +02:00
2024-04-12 16:04:58 +02:00
2024-04-10 10:27:07 +02:00
2023-02-01 15:53:50 +01:00
2023-01-06 12:12:43 +01:00
2021-06-03 13:49:26 +02:00
2024-04-03 23:23:24 +02:00
2024-03-10 22:35:04 +02:00
2024-03-13 09:35:51 +01:00
2024-03-13 09:35:51 +01:00
2024-01-13 19:38:02 +00:00
2022-05-20 17:14:19 +01:00
2021-06-10 13:15:35 +02:00
2021-06-03 13:49:26 +02:00
2024-04-02 14:32:49 -05:00
2024-04-02 14:32:49 -05:00
2024-04-03 23:23:24 +02:00
2023-03-31 15:01:20 +02:00
2023-09-26 11:38:46 +01:00
2022-04-26 16:56:43 +02:00
2024-03-10 22:35:04 +02:00
2024-03-10 22:35:04 +02:00
2022-10-04 13:35:45 +02:00
2024-04-02 14:32:49 -05:00
2024-04-02 14:32:49 -05:00
2022-10-31 14:05:48 +01:00
2022-10-31 14:05:48 +01:00
2023-12-02 09:40:31 +00:00
2023-12-12 10:00:48 +01:00
2024-03-13 09:35:51 +01:00
2023-09-26 11:38:46 +01:00
2024-04-03 23:23:24 +02:00
2024-02-15 15:15:02 +01:00
2024-01-11 07:49:05 +00:00
2024-01-11 07:49:05 +00:00
2024-04-02 14:32:49 -05:00
2020-12-04 21:01:17 +01:00
2024-02-21 14:22:15 +01:00
2021-03-16 11:42:38 +01:00
2021-03-01 18:33:14 +01:00
2021-03-16 11:42:38 +01:00
2021-03-13 17:56:21 +01:00
2020-11-24 21:05:38 +01:00
2024-01-30 15:17:38 +01:00
2024-04-02 14:32:49 -05:00
2022-11-21 13:10:39 +01:00
2020-12-08 18:53:58 +01:00
2020-12-01 18:28:24 +01:00
2021-12-03 15:45:05 +01:00
2023-03-31 15:01:20 +02:00
2022-04-26 16:56:43 +02:00
2024-03-10 22:35:04 +02:00
2021-03-16 11:42:38 +01:00
2022-10-31 14:05:48 +01:00
2022-10-03 13:01:01 +01:00
2020-12-08 09:53:13 +01:00
2024-04-11 12:45:48 +02:00
2023-12-06 16:09:03 -06:00
2023-09-26 11:38:46 +01:00
2021-09-30 21:01:38 +02:00
2024-02-28 12:37:31 +01:00
2024-04-02 14:32:49 -05:00
2024-04-02 14:32:49 -05:00