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

add tmp_upath_factory fixture #8

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Conversation

dtrifiro
Copy link
Contributor

No description provided.

@dtrifiro dtrifiro marked this pull request as draft June 24, 2022 18:15
@dtrifiro dtrifiro marked this pull request as ready for review June 24, 2022 18:24
Comment on lines 25 to +34
self.proc = subprocess.Popen(
shlex.split("moto_server s3 -p %s" % self.port)
shlex.split(
f"moto_server s3 -p {self.port}",
),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Copy link
Member

Choose a reason for hiding this comment

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

Looks like we are seriously polluting your machine ports, which will turn ugly. Take a look at how we do it in dvc - we spawn one container with moto (and azurite in the future, for example) to simulate real s3 and we use a random single port without polluting.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

If we at least don't spam lots of servers - this will become minor 🙂

Copy link
Contributor Author

@dtrifiro dtrifiro Jun 29, 2022

Choose a reason for hiding this comment

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

Added an optional flag (--moto-server) to set a custom port. In #13 I introduce a docker fixture which can be used to spawn docker containers. I will introduce some proper port management after that.

@dtrifiro dtrifiro marked this pull request as draft June 28, 2022 09:25
@dtrifiro dtrifiro marked this pull request as ready for review June 29, 2022 09:11
@dtrifiro dtrifiro force-pushed the add-make-tmp-upath branch 2 times, most recently from a206a50 to 06595c6 Compare June 29, 2022 09:43
src/pytest_servers/s3.py Outdated Show resolved Hide resolved
@dtrifiro dtrifiro changed the title add make tmp upath fixture add tmp_upath_factory fixture Jun 29, 2022
@efiop efiop merged commit 213987d into iterative:main Jun 29, 2022
@dtrifiro dtrifiro deleted the add-make-tmp-upath branch June 30, 2022 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants