diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2019-10-09 13:24:23 +0200 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2019-10-09 15:17:04 +0200 |
| commit | 5a9ea06131cd0cec344a49a278405a73c753a7f9 (patch) | |
| tree | c40e8ccf2b5f5e17dd15cb8581690dc43c5184e7 | |
| parent | 2fee56ef1db0f5ff209f59aca2d9e0b461d95551 (diff) | |
overlord: set fake sertial in TestRemodelSwitchToDifferentKernelfix-osc-build
This prevents the code to try to request a real serial which is incorrect.
| -rw-r--r-- | overlord/managers_test.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/overlord/managers_test.go b/overlord/managers_test.go index 0b483ca25d..7644c43bb7 100644 --- a/overlord/managers_test.go +++ b/overlord/managers_test.go @@ -3565,8 +3565,9 @@ version: 1.0` // setup model assertion devicestatetest.SetDevice(st, &auth.DeviceState{ - Brand: "can0nical", - Model: "my-model", + Brand: "can0nical", + Model: "my-model", + Serial: "serialserialserial", }) err := assertstate.Add(st, model) c.Assert(err, IsNil) @@ -3621,6 +3622,13 @@ version: 1.0` // ensure that we only have the tasks we checked (plus the one // extra "set-model" task) c.Assert(tasks, HasLen, i+1) + + // ensure we did not try device registration + for _, t := range st.Tasks() { + if t.Kind() == "request-serial" { + c.Fatalf("test should not create a request-serial task but did") + } + } } func (s *mgrsSuite) TestRemodelStoreSwitch(c *C) { |
