Repository navigation
Feature/startup certain services #1528
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
Merged
rnorth
merged 14 commits into
testcontainers:master
from
HaMatthias:feature/startup-certain-services
Jul 6, 2019
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ca49bb7
new: startup certain services
c7a0174
add: better modularisation
a93e44b
add: tests for the new implementation
887446e
Merge branch 'master' into feature/startup-certain-services
HaMatthias 247fd19
Merge branch 'master' into feature/startup-certain-services
HaMatthias cb49801
Merge branch 'master' into feature/startup-certain-services
HaMatthias 0fe939f
Merge branch 'master' into feature/startup-certain-services
HaMatthias 0bfd440
Update .gitignore
HaMatthias 9d95a61
Merge branch 'master' into feature/startup-certain-services
HaMatthias a045bd7
Update core/src/main/java/org/testcontainers/containers/DockerCompose…
HaMatthias 2a570d0
fix: compile Errors
2be5481
Merge branch 'master' into feature/startup-certain-services
HaMatthias 80922e2
Merge branch 'master' into feature/startup-certain-services
HaMatthias 27493b9
Merge branch 'master' into feature/startup-certain-services
rnorth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
core/src/test/java/org/testcontainers/junit/DockerComposeServiceTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| package org.testcontainers.junit; | ||
|
|
||
| import org.junit.Rule; | ||
| import org.junit.Test; | ||
| import org.testcontainers.containers.DockerComposeContainer; | ||
|
|
||
| import static org.rnorth.visibleassertions.VisibleAssertions.assertNotNull; | ||
|
|
||
| import java.io.File; | ||
|
|
||
| public class DockerComposeServiceTest extends BaseDockerComposeTest { | ||
|
|
||
| @Rule | ||
| public DockerComposeContainer environment = new DockerComposeContainer(new File("src/test/resources/compose-test.yml")) | ||
| .withServices("redis") | ||
| .withExposedService("redis_1", REDIS_PORT); | ||
|
|
||
|
|
||
| @Override | ||
| protected DockerComposeContainer getEnvironment() { | ||
| return environment; | ||
| } | ||
|
|
||
| @Test(expected = NullPointerException.class) | ||
| public void testDbIsNotStarting() { | ||
| environment.getServicePort("db_1", 10001); | ||
| } | ||
|
|
||
| @Test | ||
| public void testRedisIsStarting() { | ||
| assertNotNull("Redis server started", environment.getServicePort("redis_1", REDIS_PORT)); | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.