Cluster-api-provider-aws: Unit testing for AWSMachine controller

Created on 19 Aug 2019  路  5Comments  路  Source: kubernetes-sigs/cluster-api-provider-aws

/kind feature

Describe the solution you'd like
[A clear and concise description of what you want to happen.]
We should have some more comprehensive unit testing around AWSMachine reconciliation, perhaps using mocks and stuff.

We should test AWSMachines as they move through phases.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api-provider-aws version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
kinfeature lifecyclactive prioritimportant-soon

Most helpful comment

/assign
/lifecycle active

past!liz was a coward, present!liz is forging onwards

All 5 comments

/priority important-soon
/milestone v0.4

/assign
/lifecycle active

/unassign
/remove-lifecycle active

This is a hairy problem. The machine controller has several hundred-line functions, takes in multiple giant blocks of mutable state, and has almost no modularity. I don't have any confidence in my ability to write tests that will actually get used.

image
here's my diagram of the requirements of just one reconcile function

/assign
/lifecycle active

past!liz was a coward, present!liz is forging onwards

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benmoss picture benmoss  路  8Comments

Lokicity picture Lokicity  路  7Comments

benmoss picture benmoss  路  5Comments

chuckha picture chuckha  路  7Comments

randomvariable picture randomvariable  路  3Comments