Cluster-api: [clusterctl] Add unit tests for InitImages method

Created on 6 Apr 2020  路  14Comments  路  Source: kubernetes-sigs/cluster-api

Currently, we do not have any unit tests for InitImages in init_test.go

There is a basic test being added in PR https://github.com/kubernetes-sigs/cluster-api/pull/2856 but we need the other cases to be fleshed out.
See https://github.com/kubernetes-sigs/cluster-api/pull/2856/files#diff-f516e05fd6c3975f176daa8f8fa37c8eR31

/good-first-issue
/area clusterctl

areclusterctl good first issue help wanted lifecyclactive

Most helpful comment

Could I have a look for this issue?
/assign

All 14 comments

@wfernandes:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

Currently, we do not have any unit tests for InitImages in init_test.go

There is a basic test being added in PR https://github.com/kubernetes-sigs/cluster-api/pull/2856 but we need the other cases to be fleshed out.
See https://github.com/kubernetes-sigs/cluster-api/pull/2856/files#diff-f516e05fd6c3975f176daa8f8fa37c8eR31

/good-first-issue
/area clusterctl

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/milestone v0.3.x

Could I have a look for this issue?
/assign

Go for it @ericzhang08.

/milestone v0.3.4

/lifecycle active

/milestone v0.3.x

Adding this for context.
I've added another test for InitImages as part of PR: https://github.com/kubernetes-sigs/cluster-api/pull/3059

I still believe we can add more test cases as part of this issue/PR. For example,

  • returns images for cert-manager
  • returns images for the default providers

@ericzhang08 Are you still working on this? Else I can fill in a few more tests as part of the PR mentioned above.

@wfernandes Have you already add all tests? If not, I will add others this week.

@ericzhang08 I don't believe I have added all the test cases. So far I've been adding test cases that are specific to the use cases I run into when I need to touch that part of the code.
I've been avoiding adding all the test cases as technically they do not pertain to the issue that I'm working on. So go for it 馃檪

@ericzhang08 Are you still interested in this issue?

@ericzhang08 I do not mind to give it a try if you do not have time.
If so you can assign it to me.

@joaopapereira Feel free to assign it to yourself with /assign and mark it as /lifecycle active to indicate that you are working on it. Thanks!

/assign
/lifecycle active

Was this page helpful?
0 / 5 - 0 ratings