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 withFileSystemBind + name parameters #206

Merged
merged 3 commits into from
Jan 28, 2022

Conversation

benkio
Copy link
Contributor

@benkio benkio commented Jan 16, 2022

Related to issue #205

@@ -8,6 +8,7 @@ class FixedHostPortGenericContainer(imageName: String,
env: Map[String, String] = Map(),
command: Seq[String] = Seq(),
classpathResourceMapping: Seq[(String, String, BindMode)] = Seq(),
fileSystemBind: Seq[(String, String, BindMode)] = Seq(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

would you mind moving this argument to be last? it'll help to protect those who use positional arguments

@@ -33,16 +35,19 @@ object FixedHostPortGenericContainer {
env: Map[String, String] = Map(),
command: Seq[String] = Seq(),
classpathResourceMapping: Seq[(String, String, BindMode)] = Seq(),
fileSystemBind: Seq[(String, String, BindMode)] = Seq(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

this one too

@@ -21,6 +21,7 @@ class GenericContainer(
env: Map[String, String] = Map(),
command: Seq[String] = Seq(),
classpathResourceMapping: Seq[(String, String, BindMode)] = Seq(),
fileSystemBind: Seq[(String, String, BindMode)] = Seq(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

And in this class please

@@ -10,7 +10,8 @@ class FixedHostPortGenericContainer(imageName: String,
classpathResourceMapping: Seq[(String, String, BindMode)] = Seq(),
waitStrategy: Option[WaitStrategy] = None,
exposedHostPort: Int,
exposedContainerPort: Int
exposedContainerPort: Int,
fileSystemBind: Seq[(String, String, BindMode)] = Seq()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for the delay. Just realized that I haven't submitted another comment - would it make sense to introduce a case class instead of tuple? otherwise, we need to make it more easier to understand what first two string params are.

Copy link
Contributor Author

@benkio benkio Jan 27, 2022

Choose a reason for hiding this comment

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

It makes sense to have that, what do you think is the best place to put such case class? as a name, I'm thinking about FileSystemBinding and we can use it also for the classpath binding (even if it's a change break, but at least we are consistent). Let me know your thoughts ;)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I think it's reasonable

@dimafeng
Copy link
Collaborator

@benkio apologies for the delay and missing a comment, hope it makes sense.

@benkio
Copy link
Contributor Author

benkio commented Jan 27, 2022

hi @dimafeng
Sorry for the delay, but I have too many notifications in Github due to coworkers 😅
I just remembered about this PR. I added a commit, I hope this is what you meant.
🙏

@dimafeng
Copy link
Collaborator

@benkio Thank you!

@dimafeng dimafeng merged commit e327921 into testcontainers:master Jan 28, 2022
@benkio benkio deleted the 205_AddWithFileSystemBind branch January 28, 2022 08:43
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.

2 participants