summaryrefslogtreecommitdiff
diff options
authorPaweł Stołowski <stolowski@gmail.com>2021-11-04 17:13:27 +0100
committerPaweł Stołowski <stolowski@gmail.com>2021-11-09 11:45:42 +0100
commitc84d121e75cda59000032f995f784db8cc118d35 (patch)
tree8d2340aef953522879d96604e9e2e930c8d8485a
parentb4c23ce528d7501f79c18c93d988960c6b76abde (diff)
Don't unlock/lock state around settle() in the tests.
-rw-r--r--overlord/snapstate/snapstate_remove_test.go2
-rw-r--r--overlord/snapstate/snapstate_test.go2
-rw-r--r--overlord/snapstate/snapstate_update_test.go2
3 files changed, 0 insertions, 6 deletions
diff --git a/overlord/snapstate/snapstate_remove_test.go b/overlord/snapstate/snapstate_remove_test.go
index fcca0ffa86..9b9fbefac0 100644
--- a/overlord/snapstate/snapstate_remove_test.go
+++ b/overlord/snapstate/snapstate_remove_test.go
@@ -906,10 +906,8 @@ func (s *snapmgrTestSuite) TestRemoveOneRevisionDropsRevertStatus(c *C) {
c.Assert(err, IsNil)
chg.AddAll(ts)
- s.state.Unlock()
defer s.se.Stop()
s.settle(c)
- s.state.Lock()
// verify snaps in the system state
var snapst snapstate.SnapState
diff --git a/overlord/snapstate/snapstate_test.go b/overlord/snapstate/snapstate_test.go
index b888a79903..4bc28544d2 100644
--- a/overlord/snapstate/snapstate_test.go
+++ b/overlord/snapstate/snapstate_test.go
@@ -1554,10 +1554,8 @@ func (s *snapmgrTestSuite) TestRevertRevisionNotBlocked(c *C) {
c.Assert(err, IsNil)
chg.AddAll(ts)
- s.state.Unlock()
defer s.se.Stop()
s.settle(c)
- s.state.Lock()
// verify that the R(2) version is active now and R(7) is still there
var snapst snapstate.SnapState
diff --git a/overlord/snapstate/snapstate_update_test.go b/overlord/snapstate/snapstate_update_test.go
index 195905fe8c..0867ff4c58 100644
--- a/overlord/snapstate/snapstate_update_test.go
+++ b/overlord/snapstate/snapstate_update_test.go
@@ -1042,10 +1042,8 @@ func (s *snapmgrTestSuite) TestUpdateDropsRevertStatus(c *C) {
c.Assert(err, IsNil)
chg.AddAll(ts)
- s.state.Unlock()
defer s.se.Stop()
s.settle(c)
- s.state.Lock()
// verify snaps in the system state
var snapst snapstate.SnapState