9e0195e024
This should fix integration tests running on clusters that don't have visible controller manager pods (e.g., GKE). Pinniped should boot, not find any controller manager pods, but still post a status in the CIC. I also updated a test helper so that we could tell the difference between when an event was not added and when an event was added with an empty key. Signed-off-by: Andrew Keesler <akeesler@vmware.com>
25 lines
673 B
Go
25 lines
673 B
Go
// Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package testutil
|
|
|
|
import "go.pinniped.dev/internal/controllerlib"
|
|
|
|
type ObservableWithInitialEventOption struct {
|
|
key *controllerlib.Key
|
|
}
|
|
|
|
func NewObservableWithInitialEventOption() *ObservableWithInitialEventOption {
|
|
return &ObservableWithInitialEventOption{}
|
|
}
|
|
|
|
func (i *ObservableWithInitialEventOption) WithInitialEvent(key controllerlib.Key) controllerlib.Option {
|
|
i.key = new(controllerlib.Key)
|
|
*i.key = key
|
|
return controllerlib.WithInitialEvent(key)
|
|
}
|
|
|
|
func (i *ObservableWithInitialEventOption) GetInitialEventKey() *controllerlib.Key {
|
|
return i.key
|
|
}
|