diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2016-11-22 09:47:36 +0100 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2016-11-22 09:47:36 +0100 |
| commit | 88c035ed2b7a13dfe86b43cf025e7828a8f1ebf8 (patch) | |
| tree | c9428713abf0df38d4c16a2486671c2a7f9a2d94 | |
| parent | 9e65dc39c81e34453382615935e11fd7b1d58283 (diff) | |
simplify test and avoid sst instead of snapstrename/snapstate-snapst
| -rw-r--r-- | overlord/snapstate/snapmgr_test.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/overlord/snapstate/snapmgr_test.go b/overlord/snapstate/snapmgr_test.go index d4a25ca6f8..701f7782bd 100644 --- a/overlord/snapstate/snapmgr_test.go +++ b/overlord/snapstate/snapmgr_test.go @@ -3343,15 +3343,10 @@ func (s *snapmgrQuerySuite) TestAll(c *C) { snapStates, err := snapstate.All(st) c.Assert(err, IsNil) + c.Assert(snapStates, HasLen, 1) - c.Check(snapStates, HasLen, 1) - - var snapst *snapstate.SnapState - - for name, sst := range snapStates { - c.Assert(name, Equals, "name1") - snapst = sst - } + snapst := snapStates["name1"] + c.Assert(snapst, NotNil) c.Check(snapst.Active, Equals, true) c.Check(snapst.CurrentSideInfo(), NotNil) |
