mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-12 20:46:47 +00:00
Re-create the listener when GitHub secret is updated
This commit is contained in:
@@ -123,6 +123,7 @@ var defaultRunnerScaleSetJitRunnerConfig = &actions.RunnerScaleSetJitRunnerConfi
|
||||
|
||||
// FakeClient implements actions service
|
||||
type FakeClient struct {
|
||||
id uuid.UUID
|
||||
getRunnerScaleSetResult struct {
|
||||
*actions.RunnerScaleSet
|
||||
err error
|
||||
@@ -191,7 +192,9 @@ type FakeClient struct {
|
||||
}
|
||||
|
||||
func NewFakeClient(options ...Option) actions.ActionsService {
|
||||
f := &FakeClient{}
|
||||
f := &FakeClient{
|
||||
id: uuid.New(),
|
||||
}
|
||||
f.applyDefaults()
|
||||
for _, opt := range options {
|
||||
opt(f)
|
||||
@@ -199,6 +202,10 @@ func NewFakeClient(options ...Option) actions.ActionsService {
|
||||
return f
|
||||
}
|
||||
|
||||
func (f *FakeClient) ID() uuid.UUID {
|
||||
return f.id
|
||||
}
|
||||
|
||||
func (f *FakeClient) applyDefaults() {
|
||||
f.getRunnerScaleSetResult.RunnerScaleSet = defaultRunnerScaleSet
|
||||
f.getRunnerScaleSetByIdResult.RunnerScaleSet = defaultRunnerScaleSet
|
||||
|
||||
Reference in New Issue
Block a user