Fixing tests
This commit is contained in:
parent
c4e47f7430
commit
ee6da1b057
|
@ -37,6 +37,10 @@ public class ContextTest {
|
|||
|
||||
public static final String DEFAULT_TEST_SCOPE_ANOTHER_USER;
|
||||
|
||||
protected static final String REGISTRY_PROPERTIES_FILENAME = "registry.properties";
|
||||
public static final String RESOURCE_REGISTRY_URL_PROPERTY = "RESOURCE_REGISTRY_URL";
|
||||
public static final String RESOURCE_REGISTRY_URL;
|
||||
|
||||
static {
|
||||
properties = new Properties();
|
||||
InputStream input = ContextTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
|
||||
|
@ -64,6 +68,22 @@ public class ContextTest {
|
|||
} catch(Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
Properties registryProperties = new Properties();
|
||||
input = ContextTest.class.getClassLoader().getResourceAsStream(REGISTRY_PROPERTIES_FILENAME);
|
||||
try {
|
||||
// load the properties file
|
||||
registryProperties.load(input);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
RESOURCE_REGISTRY_URL = registryProperties.getProperty(RESOURCE_REGISTRY_URL_PROPERTY);
|
||||
|
||||
if(RESOURCE_REGISTRY_URL!=null){
|
||||
ResourceRegistryClientFactory.forceToURL(RESOURCE_REGISTRY_URL);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getCurrentScope(String token) throws ObjectNotFound, Exception {
|
||||
|
|
|
@ -2,3 +2,7 @@
|
|||
/devsec.gcubekey
|
||||
/gcube.gcubekey
|
||||
/token.properties
|
||||
/registry.properties
|
||||
/registry.properties.empty
|
||||
/registry.properties.redirect-test
|
||||
/registry.properties.test
|
||||
|
|
Loading…
Reference in New Issue