use of net.nemerosa.ontrack.extension.api.support.TestConfiguration in project ontrack by nemerosa.
the class ConfigurationServiceTest method replace_configuration_same.
@Test
public void replace_configuration_same() {
TestConfiguration config = config("test");
TestConfiguration replacedConfig = configurationService.replaceConfiguration(config, Function.identity());
assertSame("Same config is returned", config, replacedConfig);
}
use of net.nemerosa.ontrack.extension.api.support.TestConfiguration in project ontrack by nemerosa.
the class TestConfigurationUncryptedAction method migrate.
@Override
public void migrate(Connection connection) throws SQLException, JsonProcessingException {
try (PreparedStatement ps = connection.prepareStatement("INSERT INTO CONFIGURATIONS(TYPE, NAME, CONTENT) VALUES (?, ?, ?)")) {
ps.setString(1, TestConfiguration.class.getName());
ps.setString(2, "plain");
ps.setString(3, objectMapper.writeValueAsString(new TestConfiguration("plain", "test", "verysecret")));
ps.execute();
}
}
Aggregations