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

Refactoring/e2e tests #1316

Merged
merged 5 commits into from
Jan 17, 2024
Merged

Conversation

kwitsch
Copy link
Collaborator

@kwitsch kwitsch commented Dec 21, 2023

Changes:

  • removed tmpDir in favor of individual testfiles
  • replaced WithNetwork with a modified version of the testcontainer PR
  • moved some functions to different files to declutter containers.go

I opted for a modified version since the original one doesn't remove the network after the tests finish and also use context.Background()(which could be avoided with the Ginkgo context).

Behavior change to ensure only containers for the current test are inside the network:

  • it is created during the first WithNetwork costomization
  • it is deleted after the last container detaches
  • during deletion a new network name is generated

Closes #1224

@kwitsch kwitsch added the 🧰 technical debts Technical debts, refactoring label Dec 21, 2023
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (03131c4) 93.74% compared to head (2f6524d) 93.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1316      +/-   ##
==========================================
+ Coverage   93.74%   93.83%   +0.09%     
==========================================
  Files          77       77              
  Lines        6200     6200              
==========================================
+ Hits         5812     5818       +6     
+ Misses        299      293       -6     
  Partials       89       89              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kwitsch kwitsch enabled auto-merge (squash) December 22, 2023 13:00
@0xERR0R 0xERR0R added this to the v0.24 milestone Jan 17, 2024
Copy link
Owner

@0xERR0R 0xERR0R left a comment

Choose a reason for hiding this comment

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

👍

@kwitsch kwitsch merged commit 2d3ad83 into 0xERR0R:main Jan 17, 2024
11 checks passed
@kwitsch kwitsch deleted the refactoring/e2e-WithNetwork branch January 17, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧰 technical debts Technical debts, refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add "withNetwork" for testcontainers to e2e-implementation
2 participants