Skip to content

prep codebase for addition of integration tests#144

Merged
awprice merged 1 commit into
masterfrom
aprice/prep-integration-tests
May 19, 2026
Merged

prep codebase for addition of integration tests#144
awprice merged 1 commit into
masterfrom
aprice/prep-integration-tests

Conversation

@awprice

@awprice awprice commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Prep codebase for addition of integration tests

Preparatory refactor ahead of integration tests landing in a follow-up.

What

  • Transitioner Options gain timing knobs. All hard-coded durations
    in the CNR and CNS state machines (scaleUpWait, requeueDuration, the
    inline 60s / 30s literals, etc.) move onto the existing Options
    structs. Package-level var/const blocks are removed; call sites read
    t.options.<Knob>.
  • cmd/manager/main.go exposes them as kingpin flags. 10 new flags
    (--cnr-scale-up-wait, …, --cns-draining-pods-requeue) with defaults
    that match the previously hard-coded values exactly. Bonus: operators
    can now tune these without rebuilding.
  • NewGenericCloudProvider takes interfaces, not concrete types.
    Switched to autoscalingiface.AutoScalingAPI / ec2iface.EC2API so
    test code can wrap the existing fake with instrumented decorators.

Behaviour

Unchanged. Every flag default matches the value it replaced, and the only
signature change (NewGenericCloudProvider) is satisfied by existing
callers.

Testing

  • go test ./pkg/... ./cmd/... passes
  • go build ./... clean

Signed-off-by: Alex Price <aprice@atlassian.com>
@awprice awprice merged commit 251b401 into master May 19, 2026
6 checks passed
@awprice awprice deleted the aprice/prep-integration-tests branch May 19, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants