google-nomulus/core/src/test
Shicong Huang 2c6d71f04c
Prevent test from changing golden schema (#337)
When we add the extra test entity to the current JpaTransactionManagerRule by calling jpaRule.withEntityClass(TestEntity.class) and jpaRule.withProperty(Environment.HBM2DDL_AUTO, "update"), the rule would override the golden database scheme with the schema derived from the current entity class(This is an expected behavior by enabling HBM2DDL_AUTO). This behavior prevents us from detecting breaking changes in ORM classes.

This PR fixed the issue by adding HibernateSchemaExporter to export the DDL script for given extra entity class, and make JpaTransactionManagerRule execute the DDL script to create the corresponding table for the extra entity when initializing the database. This PR also simplified the code when adding extra entity class for testing. For now, you don't need to(and shouldn't) call jpaRule.withProperty(Environment.HBM2DDL_AUTO, "update").
2019-11-05 11:36:03 -05:00
..
java/google/registry Prevent test from changing golden schema (#337) 2019-11-05 11:36:03 -05:00
javascript/google/registry/ui/js Move JS and CSS files to a Javascript source dir (#156) 2019-07-05 12:01:16 -04:00
resources/google/registry Add another test contact for Registry Lock testing (#324) 2019-10-25 10:24:59 -04:00