kubernetes-sigs / cluster-api-provider-openstack

Cluster API implementation for OpenStack
https://cluster-api-openstack.sigs.k8s.io/
Apache License 2.0
279 stars 252 forks source link

Improve unit test coverage #843

Closed sbueringer closed 2 years ago

sbueringer commented 3 years ago

/kind feature

We now have e2e / integration / conformance tests but basically zero unit tests. I think we should change that. I think we need at least unit tests on 2 layers:

I would start with an initial implementation to establish patterns how we do unit tests for those layers

Some considerations:

Notes:

After the initial implementation I would create a list of additional unit tests for follow-up PRs, which I would then flag with help wanted / good first issue.

sbueringer commented 3 years ago

/assign (already have a lot of experience with CAPI unit tests and the controller-runtime test framework)

sbueringer commented 3 years ago

/unassign

Didn't have time for this. So let's see if somebody wants to pick it up until the next minor release

sbueringer commented 3 years ago

Related to this slack conversation: https://kubernetes.slack.com/archives/CFKJB65G9/p1623237546041600

@macaptain just fyi, this is the corresponding issue :)

Are you currently on it?

macaptain commented 3 years ago

@sbueringer, yes I was hoping to have a go this week.

/assign

sbueringer commented 3 years ago

@macaptain Perfect, great!

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

tobiasgiese commented 2 years ago

@macaptain are you still on this?

macaptain commented 2 years ago

@tobiasgiese, I completed an initial implementation of mocking the OpenStack API to support unit tests in CAPO (#935).

Per the issue description:

After the initial implementation I would create a list of additional unit tests for follow-up PRs, which I would then flag with help wanted / good first issue.

I expect we could do this now. @mdbooth had a really promising draft #1030 mocking out the interfaces in the compute module which would also help!

/unassign

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-ci-robot commented 2 years ago

@k8s-triage-robot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/843#issuecomment-983373971): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues and PRs according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.