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

Use the plugin with integration tests #6

Open
rblazquez opened this issue Feb 3, 2015 · 1 comment
Open

Use the plugin with integration tests #6

rblazquez opened this issue Feb 3, 2015 · 1 comment

Comments

@rblazquez
Copy link

Hi

Would you provide me some support in order to integrate the flyway through this plugin in the grails integration tests phase? ... im using class that extends GroovyTestCase for these tests.

I want to completely replace the schema handling strategy to use flyway in all environments.

P.D. What i might want is to be able to access the FlyWay or GFlyway objects from the context to be able to execute commands but i get [...]/test/integration/[...]/api/test/common/FlywayIntegrationTests.groovy: 10: unable to resolve class GFlyway
@ line 10, column 5.
@Autowired
^

My code is:

abstract class FlywayIntegrationTests extends GroovyTestCase {

@Autowired
private GFlyway f;

@BeforeClass
public void init() throws Exception {
    clearDb();
}

protected void clearDb() {
    f.clean();
    f.init();
    f.migrate();
}

}
Then i will make all my integration test classes to extends from this class.

Thanks in advance

@rblazquez
Copy link
Author

Sorry guys ... i just was missing the import. It's working better now although i sitll cannot say it's done ... need to test more.

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

No branches or pull requests

1 participant