Search in sources :

Example 1 with GrouperClientConfig

use of edu.internet2.middleware.grouperClient.util.GrouperClientConfig in project uhgroupings by uhawaii-system-its-ti-iam.

the class GrouperPropertyConfigurer method init.

@PostConstruct
public void init() {
    GrouperClientConfig config = GrouperClientConfig.retrieveConfig();
    setOverride(config, "grouperClient.webService.url");
    setOverride(config, "grouperClient.webService.login");
    setOverride(config, "grouperClient.webService.password");
}
Also used : GrouperClientConfig(edu.internet2.middleware.grouperClient.util.GrouperClientConfig) PostConstruct(javax.annotation.PostConstruct)

Example 2 with GrouperClientConfig

use of edu.internet2.middleware.grouperClient.util.GrouperClientConfig in project uhgroupings by uhawaii-system-its-ti-iam.

the class GrouperPropertyConfigurerTest method testing.

@Test
public void testing() {
    GrouperClientConfig config = GrouperClientConfig.retrieveConfig();
    String key = "grouperClient.webService.url";
    String testUrl = "test-url-b";
    String value = config.propertiesOverrideMap().get(key);
    assertNotEquals(value, testUrl);
    // Will cause an override of value.
    env.getSystemProperties().put(key, testUrl);
    grouperPropertyConfigurer.init();
    value = config.propertiesOverrideMap().get(key);
    assertThat(value, equalTo(testUrl));
}
Also used : GrouperClientConfig(edu.internet2.middleware.grouperClient.util.GrouperClientConfig) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Test(org.junit.Test)

Aggregations

GrouperClientConfig (edu.internet2.middleware.grouperClient.util.GrouperClientConfig)2 PostConstruct (javax.annotation.PostConstruct)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1