mirror of
https://github.com/actions-runner-controller/actions-runner-controller.git
synced 2026-10-01 17:28:42 +02:00
Detect listener pod drift by comparing the pod, not a hash (#4635)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot App
parent
c475023e28
commit
0cfedfbb2c
@@ -0,0 +1,19 @@
|
||||
package actionsgithubcom
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// BenchmarkListenerPodSpecRequiresRecreation measures the listener pod drift
|
||||
// check, which also runs on every AutoscalingListener reconcile.
|
||||
func BenchmarkListenerPodSpecRequiresRecreation(b *testing.B) {
|
||||
desired := desiredListenerPod()
|
||||
live := livePodFromDesired(desired)
|
||||
b.ReportAllocs()
|
||||
b.ResetTimer()
|
||||
for range b.N {
|
||||
if listenerPodSpecRequiresRecreation(live, desired) {
|
||||
b.Fatal("expected no recreation")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user