You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (s *MockCharmStore) WithAuthAttrs(auth string) charm.Repository {
s.AuthAttrs = auth
return s
}
func (s *MockCharmStore) WithTestMode(testMode bool) charm.Repository {
s.TestMode = testMode
return s
}
func (s *MockCharmStore) WithDefaultSeries(series string) charm.Repository {
s.DefaultSeries = series
return s
}
The following methods appear to return a copy of their receiver with a particular testing setting specified. However they do not, they modify their receiver and return themselves, not a copy.
This is bad for several reasons, none the least it produces a race condition as there is no synchronisation for these actions.
The text was updated successfully, but these errors were encountered:
Fixes#69
The code inside juju expects that these methods behave like setters.
Also add a mutex to make updating these values safe for multiple goroutines.
The following methods appear to return a copy of their receiver with a particular testing setting specified. However they do not, they modify their receiver and return themselves, not a copy.
This is bad for several reasons, none the least it produces a race condition as there is no synchronisation for these actions.
The text was updated successfully, but these errors were encountered: