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

refactor: read RYUK_CONTAINER_PRIVILEGED once #475

Conversation

zregvart
Copy link
Contributor

@zregvart zregvart commented Jul 1, 2022

Now the environment variable TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED is read only once in the configureTC function that reads the .testcontainers.properties file and accesses the environment variable.

docker.go Outdated Show resolved Hide resolved
@zregvart zregvart force-pushed the pr/refactor-privileged-ryuk-env-variable branch from cf12297 to 625af9d Compare July 1, 2022 08:49
@codecov
Copy link

codecov bot commented Jul 1, 2022

Codecov Report

Merging #475 (d28f363) into main (f93cdb4) will decrease coverage by 0.28%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #475      +/-   ##
==========================================
- Coverage   69.56%   69.28%   -0.29%     
==========================================
  Files          21       21              
  Lines        1942     1947       +5     
==========================================
- Hits         1351     1349       -2     
- Misses        474      479       +5     
- Partials      117      119       +2     
Impacted Files Coverage Δ
docker.go 69.39% <100.00%> (-0.64%) ⬇️
reaper.go 83.78% <100.00%> (ø)

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 f93cdb4...d28f363. Read the comment docs.

docker.go Show resolved Hide resolved
@zregvart zregvart force-pushed the pr/refactor-privileged-ryuk-env-variable branch 3 times, most recently from 0d545f4 to 2f6a263 Compare July 1, 2022 10:38
Now the environment variable `TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED`
is read only once in the `configureTC` function that reads the
`.testcontainers.properties` file and accesses the environment variable.
@zregvart zregvart force-pushed the pr/refactor-privileged-ryuk-env-variable branch from 2f6a263 to d28f363 Compare July 1, 2022 10:44
@@ -752,6 +754,11 @@ func readTCPropsFile() TestContainersConfig {
return TestContainersConfig{}
Copy link
Member

Choose a reason for hiding this comment

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

I'm going to merge this one, although I wonder if the struct we are returning here should consider the env variables too 🤔

@mdelapenya mdelapenya added the feature New functionality or new behaviors on the existing one label Jul 5, 2022
@mdelapenya mdelapenya merged commit 6ba6e7a into testcontainers:main Jul 5, 2022
@zregvart zregvart deleted the pr/refactor-privileged-ryuk-env-variable branch July 5, 2022 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or new behaviors on the existing one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants