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

Allow passing explicit Configuration via `DropwizardTestSupport`, `DropwizardAppRule` (for #1130) #1131

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@cowtowncoder
Contributor

cowtowncoder commented Jun 24, 2015

PR adds an alternate way to construct test scaffolding, by passing pre-constructed Configuration instead of relying on a YAML resource. This is useful for tests where configuration is programmatically set. Other minor access changes needed to support this functionality.

@arteam

View changes

Show outdated Hide outdated ...d-testing/src/main/java/io/dropwizard/testing/DropwizardTestSupport.java
@arteam

View changes

Show outdated Hide outdated ...d-testing/src/main/java/io/dropwizard/testing/DropwizardTestSupport.java
@arteam

View changes

Show outdated Hide outdated ...d-testing/src/main/java/io/dropwizard/testing/DropwizardTestSupport.java
@arteam

View changes

Show outdated Hide outdated ...d-testing/src/main/java/io/dropwizard/testing/DropwizardTestSupport.java
@cowtowncoder

This comment has been minimized.

Show comment
Hide comment
@cowtowncoder

cowtowncoder Jun 26, 2015

Contributor

Thanks! Will fix the issues.

Contributor

cowtowncoder commented Jun 26, 2015

Thanks! Will fix the issues.

@arteam

View changes

Show outdated Hide outdated ...esting/src/main/java/io/dropwizard/testing/POJOConfigurationFactory.java
public class DropwizardAppRuleWithExplicitTest {
@Test
public void bogusTest() { }

This comment has been minimized.

@arteam

arteam Jun 26, 2015

Member

What is the point of this test? Sorry, but I don't follow.

@arteam

arteam Jun 26, 2015

Member

What is the point of this test? Sorry, but I don't follow.

This comment has been minimized.

@cowtowncoder

cowtowncoder Jun 26, 2015

Contributor

I'll have to go back to ensure, but the idea was to verify that given Configuration object indeed is passed as-is, instead of being loaded from the resource.

@cowtowncoder

cowtowncoder Jun 26, 2015

Contributor

I'll have to go back to ensure, but the idea was to verify that given Configuration object indeed is passed as-is, instead of being loaded from the resource.

This comment has been minimized.

@cowtowncoder

cowtowncoder Jun 26, 2015

Contributor

Right. So, basically it exercises the new method, passing config, instead of a path to YAML resource from which Configuration would be read. Most of the stuff is fluff, scaffolding, the meat is just the construction of DropwizardAppRule and verifying client returns expected message.

@cowtowncoder

cowtowncoder Jun 26, 2015

Contributor

Right. So, basically it exercises the new method, passing config, instead of a path to YAML resource from which Configuration would be read. Most of the stuff is fluff, scaffolding, the meat is just the construction of DropwizardAppRule and verifying client returns expected message.

@arteam

This comment has been minimized.

Show comment
Hide comment
@arteam

arteam Jun 26, 2015

Member

Thanks, Tatu. Apart from some nitpicks, the patch looks good to me.

Member

arteam commented Jun 26, 2015

Thanks, Tatu. Apart from some nitpicks, the patch looks good to me.

@jplock jplock added this to the 0.9.0 milestone Jul 2, 2015

@arteam

This comment has been minimized.

Show comment
Hide comment
@arteam

arteam Jul 2, 2015

Member

The patch has already been applied to master in 15e561d.
For some reason the pull request remained opened. I close it manually.

Thanks again to @cowtowncoder for work on this.

Member

arteam commented Jul 2, 2015

The patch has already been applied to master in 15e561d.
For some reason the pull request remained opened. I close it manually.

Thanks again to @cowtowncoder for work on this.

@arteam arteam closed this Jul 2, 2015

@cowtowncoder

This comment has been minimized.

Show comment
Hide comment
@cowtowncoder

cowtowncoder Jul 3, 2015

Contributor

Excellent! Thank you for thorough review & merging.

Contributor

cowtowncoder commented Jul 3, 2015

Excellent! Thank you for thorough review & merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment