-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#17608 from cderici/merge-3.4-3.5-20240627
juju#17608 Bringing: - juju#17594 - juju#17597 No conflicts
- Loading branch information
Showing
6 changed files
with
159 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
38 changes: 37 additions & 1 deletion
38
apiserver/facades/controller/crosscontroller/package_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,50 @@ | ||
// Copyright 2017 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
package crosscontroller_test | ||
package crosscontroller | ||
|
||
import ( | ||
"testing" | ||
|
||
gc "gopkg.in/check.v1" | ||
"gopkg.in/tomb.v2" | ||
) | ||
|
||
func TestAll(t *testing.T) { | ||
gc.TestingT(t) | ||
} | ||
|
||
type mockNotifyWatcher struct { | ||
tomb tomb.Tomb | ||
changes chan struct{} | ||
} | ||
|
||
func newMockNotifyWatcher() *mockNotifyWatcher { | ||
w := &mockNotifyWatcher{changes: make(chan struct{}, 1)} | ||
w.tomb.Go(func() error { | ||
<-w.tomb.Dying() | ||
return nil | ||
}) | ||
return w | ||
} | ||
|
||
func (w *mockNotifyWatcher) Stop() error { | ||
w.Kill() | ||
return w.Wait() | ||
} | ||
|
||
func (w *mockNotifyWatcher) Wait() error { | ||
return w.tomb.Wait() | ||
} | ||
|
||
func (w *mockNotifyWatcher) Kill() { | ||
w.tomb.Kill(nil) | ||
} | ||
|
||
func (w *mockNotifyWatcher) Err() error { | ||
return w.tomb.Err() | ||
} | ||
|
||
func (w *mockNotifyWatcher) Changes() <-chan struct{} { | ||
return w.changes | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters