From 36e1e5da6712aa9147559357155a7927b327e02c Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Wed, 8 Dec 2021 12:08:37 +0000
Subject: [PATCH] ota: rename observerKey to stateObserverKey

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 ota/state_test.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ota/state_test.go b/ota/state_test.go
index 6079cbb..ac4ee7e 100644
--- a/ota/state_test.go
+++ b/ota/state_test.go
@@ -228,14 +228,14 @@ func (s *stateGuardSuite) TestAlterStateSuccess(c *C) {
 	c.Check(s.saved, DeepEquals, &ota.SystemState{BootMode: boot.Try})
 }
 
-type observerKey struct{}
+type stateObserverKey struct{}
 
 func (s *stateGuardSuite) TestObserver(c *C) {
-	s.guard.RegisterObserver(observerKey{}, func(st *ota.SystemState) error {
+	s.guard.RegisterObserver(stateObserverKey{}, func(st *ota.SystemState) error {
 		c.Assert(st.BootMode, Equals, boot.Try)
 		return nil
 	})
-	defer s.guard.RemoveObserver(observerKey{})
+	defer s.guard.RemoveObserver(stateObserverKey{})
 
 	err := s.guard.AlterState(func(st *ota.SystemState) (bool, error) {
 		st.BootMode = boot.Try
@@ -249,11 +249,11 @@ func (s *stateGuardSuite) TestObserver(c *C) {
 }
 
 func (s *stateGuardSuite) TestObserverError(c *C) {
-	s.guard.RegisterObserver(observerKey{}, func(st *ota.SystemState) error {
+	s.guard.RegisterObserver(stateObserverKey{}, func(st *ota.SystemState) error {
 		c.Assert(st.BootMode, Equals, boot.Try)
 		return errBoom
 	})
-	defer s.guard.RemoveObserver(observerKey{})
+	defer s.guard.RemoveObserver(stateObserverKey{})
 
 	err := s.guard.AlterState(func(st *ota.SystemState) (bool, error) {
 		st.BootMode = boot.Try
-- 
GitLab