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

DockerFileUtilTest : Use JUnit5's @TempDir annotation for creating temporary directories #2775

Closed
2 tasks done
rohanKanojia opened this issue Mar 6, 2024 · 3 comments · Fixed by #2799
Closed
2 tasks done
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@rohanKanojia
Copy link
Member

rohanKanojia commented Mar 6, 2024

Component

JKube Kit

Task description

Description

We are creating temporary directories for testing like this here

https://github.com/eclipse/jkube/blob/b64915ec6090dcb0171e45b6372052278210e6f3/jkube-kit/build/api/src/test/java/org/eclipse/jkube/kit/build/api/helper/DockerFileUtilTest.java#L83-L84

We should probably refactor this code to use @TempDir annotation . There are already some tests using this annotation, maybe make this a member level field.

Expected Behavior

Files.createTempDirectory is replaced with @TempDir annotation field

Acceptance Criteria

  • Files.createTempDirectory is replaced with @TempDir annotation field
  • Instead of new FileOutputStream(ret) use Files.newOutputStream(ret.toPath())
@rohanKanojia rohanKanojia added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 6, 2024
@RISHIKESHk07
Copy link

@rohanKanojia would luv give it a try ?

@rohanKanojia
Copy link
Member Author

@RISHIKESHk07 : Are you contributing for the first time ? If that's the case maybe you want to look into first-timers-only tagged issues https://github.com/eclipse/jkube/issues?q=is%3Aissue+is%3Aopen+label%3Afirst-timers-only

@clarenced
Copy link
Contributor

clarenced commented Mar 9, 2024

If no one is working on this issue, I can provide some help with this one. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants