Re-create the listener when GitHub secret is updated

This commit is contained in:
Nikola Jokic
2025-04-14 10:35:52 +02:00
parent 15990d492d
commit 8a8d279aba
9 changed files with 234 additions and 23 deletions

View File

@@ -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