Fixing junit tests
This commit is contained in:
parent
304d197409
commit
2cb32903b0
|
@ -27,15 +27,9 @@ public class ContextTest {
|
|||
protected static Properties properties;
|
||||
protected static final String PROPERTIES_FILENAME = "token.properties";
|
||||
|
||||
public static final String PARENT_DEFAULT_TEST_SCOPE;
|
||||
public static final String DEFAULT_TEST_SCOPE;
|
||||
public static final String ALTERNATIVE_TEST_SCOPE;
|
||||
|
||||
public static final String GCUBE;
|
||||
public static final String DEVNEXT;
|
||||
public static final String NEXTNEXT;
|
||||
public static final String DEVSEC;
|
||||
public static final String DEVVRE;
|
||||
public static final String ROOT_DEV;
|
||||
public static final String ROOT_PREPROD;
|
||||
public static final String ROOT_PROD;
|
||||
|
||||
static {
|
||||
properties = new Properties();
|
||||
|
@ -48,19 +42,9 @@ public class ContextTest {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
// PARENT_DEFAULT_TEST_SCOPE = "/pred4s"
|
||||
// DEFAULT_TEST_SCOPE_NAME = PARENT_DEFAULT_TEST_SCOPE + "/preprod";
|
||||
// ALTERNATIVE_TEST_SCOPE = DEFAULT_TEST_SCOPE_NAME + "/preVRE";
|
||||
|
||||
GCUBE = "/gcube";
|
||||
DEVNEXT = GCUBE + "/devNext";
|
||||
NEXTNEXT = DEVNEXT + "/NextNext";
|
||||
DEVSEC = GCUBE + "/devsec";
|
||||
DEVVRE = DEVSEC + "/devVRE";
|
||||
|
||||
PARENT_DEFAULT_TEST_SCOPE = "/gcube";
|
||||
DEFAULT_TEST_SCOPE = PARENT_DEFAULT_TEST_SCOPE + "/devNext";
|
||||
ALTERNATIVE_TEST_SCOPE = DEFAULT_TEST_SCOPE + "/NextNext";
|
||||
ROOT_DEV = "/gcube";
|
||||
ROOT_PREPROD = "/pred4s";
|
||||
ROOT_PROD = "/d4science.research-infrastructures.eu";
|
||||
|
||||
}
|
||||
|
||||
|
@ -104,7 +88,7 @@ public class ContextTest {
|
|||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
setContextByName(DEFAULT_TEST_SCOPE);
|
||||
setContextByName(ROOT_DEV);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
|
|
@ -19,7 +19,7 @@ public class DataBaseCreator extends ContextTest {
|
|||
|
||||
@Test
|
||||
public void createDatabase() throws Exception {
|
||||
ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE);
|
||||
ContextTest.setContextByName(ROOT_DEV);
|
||||
logger.debug("Going to create DB");
|
||||
String db = DatabaseEnvironment.DB_URI;
|
||||
logger.debug("{} created", db);
|
||||
|
@ -27,7 +27,7 @@ public class DataBaseCreator extends ContextTest {
|
|||
|
||||
@Test
|
||||
public void createAllContext() throws Exception {
|
||||
ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE);
|
||||
ContextTest.setContextByName(ROOT_DEV);
|
||||
ContextCreator contextCreator = new ContextCreator();
|
||||
contextCreator.all();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue