Skip to content

Commit

Permalink
Reinstate the state status test
Browse files Browse the repository at this point in the history
Once we've removed the model-cache we can use state to check the status.
  • Loading branch information
SimonRichardson committed Jan 31, 2022
1 parent 375cac4 commit efac73b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions api/watcher/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func (s *watcherSuite) setupOfferStatusWatch(
}

// Initial event.
assertChange(status.Unknown, "")
assertChange(status.Unset, "")
return assertChange, assertNoChange, stop
}

Expand All @@ -496,13 +496,10 @@ func (s *watcherSuite) TestOfferStatusWatcher(c *gc.C) {
assertChange, assertNoChange, stop := s.setupOfferStatusWatch(c)
defer stop()

// watcher needs to come from model cache: https://bugs.launchpad.net/juju/+bug/1883625"
// Until then, the status checking is bypassed.
var err error
// err := mysql.SetStatus(status.StatusInfo{Status: status.Unknown, Message: "another message"})
// c.Assert(err, jc.ErrorIsNil)
err := mysql.SetStatus(status.StatusInfo{Status: status.Unknown, Message: "another message"})
c.Assert(err, jc.ErrorIsNil)

// assertChange(status.Waiting, "another message")
assertChange(status.Unknown, "another message")

// Removing offer and application both trigger events.
offers := state.NewApplicationOffers(s.State)
Expand Down

0 comments on commit efac73b

Please sign in to comment.