Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move env related functionality into own package and apply proper testing #6

Merged
merged 1 commit into from Mar 9, 2021

Conversation

saschagrunert
Copy link
Member

The first thing we do is moving the util/env.go into a new sub-package
env/. The package is now using an internal impl to be able to apply
properly mocked unit testing which is not dependent from the machine
they're running on.

Godoc can be used to demonstrate the isolation of the internal package.
We only have two functions exposed via the API, whereas the underlying
implementation can be changed from within our tests.

screenshot

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 8, 2021
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 8, 2021
env/env.go Outdated Show resolved Hide resolved
@saschagrunert saschagrunert force-pushed the env-test branch 3 times, most recently from d164a1b to fecc7fb Compare March 8, 2021 16:30
The first thing we do is moving the `util/env.go` into a new sub-package
`env/`. The package is now using an internal `impl` to be able to apply
properly mocked unit testing which is not dependent from the machine
they're running on.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@justaugustus
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 9, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [justaugustus,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit f013614 into kubernetes-sigs:main Mar 9, 2021
Release Engineering (k-sigs) automation moved this from In progress to Done Mar 9, 2021
@saschagrunert saschagrunert deleted the env-test branch March 9, 2021 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Development

Successfully merging this pull request may close these issues.

None yet

4 participants