Allow update runner group for AutoScalingRunnerSet (#2216)

This commit is contained in:
Tingluo Huang
2023-01-27 09:27:52 -05:00
committed by GitHub
parent 219ba5b477
commit 803818162c
6 changed files with 196 additions and 7 deletions
@@ -83,6 +83,7 @@ var _ = Describe("Test AutoScalingRunnerSet controller", func() {
GitHubConfigSecret: configSecret.Name,
MaxRunners: &max,
MinRunners: &min,
RunnerGroup: "testgroup",
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
Containers: []corev1.Container{
@@ -144,10 +145,14 @@ var _ = Describe("Test AutoScalingRunnerSet controller", func() {
return "", nil
}
return created.Annotations[runnerScaleSetIdKey], nil
if _, ok := created.Annotations[runnerScaleSetRunnerGroupNameKey]; !ok {
return "", nil
}
return fmt.Sprintf("%s_%s", created.Annotations[runnerScaleSetIdKey], created.Annotations[runnerScaleSetRunnerGroupNameKey]), nil
},
autoscalingRunnerSetTestTimeout,
autoscalingRunnerSetTestInterval).Should(BeEquivalentTo("1"), "RunnerScaleSet should be created/fetched and update the AutoScalingRunnerSet's annotation")
autoscalingRunnerSetTestInterval).Should(BeEquivalentTo("1_testgroup"), "RunnerScaleSet should be created/fetched and update the AutoScalingRunnerSet's annotation")
// Check if ephemeral runner set is created
Eventually(