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

test: use T.TempDir to create temporary test directory #447

Merged
merged 1 commit into from
Mar 7, 2022
Merged

test: use T.TempDir to create temporary test directory #447

merged 1 commit into from
Mar 7, 2022

Conversation

Juneezee
Copy link
Contributor

@Juneezee Juneezee commented Mar 7, 2022

What type of PR is this?

cleanup

Which issue does this PR fix:

What does this PR do / Why do we need it:

We can use the T.TempDir function from the testing package to create temporary directory. The directory created by T.TempDir is automatically removed when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir

If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades. Has updating a running cluster been tested?:

This PR does not break upgrades or downgrades.

Does this change require updates to the CNI daemonset config files to work?:

No.

Does this PR introduce any user-facing change?:

No.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #447 (780b58b) into main (4be2652) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #447   +/-   ##
=======================================
  Coverage   83.73%   83.73%           
=======================================
  Files          49       49           
  Lines       10168    10168           
=======================================
  Hits         8514     8514           
  Misses       1294     1294           
  Partials      360      360           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4be2652...780b58b. Read the comment docs.

Copy link
Collaborator

@shimish2 shimish2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rchincha
Copy link
Contributor

rchincha commented Mar 7, 2022

@Juneezee thanks for the PR. We are reviewing it.

Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rchincha rchincha merged commit 0d77b60 into project-zot:main Mar 7, 2022
@rchincha rchincha added the feature New feature or request label Mar 9, 2022
@rchincha rchincha added this to In progress in zot-core via automation Mar 9, 2022
@rchincha rchincha added this to the v1.4.0 milestone Mar 9, 2022
@andaaron andaaron moved this from In progress to Done in zot-core Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
zot-core
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants