Search in sources :

Example 46 with ValuesWsResponse

use of org.sonarqube.ws.Settings.ValuesWsResponse in project sonarqube by SonarSource.

the class ValuesActionTest method return_global_values.

@Test
public void return_global_values() {
    logIn();
    definitions.addComponent(PropertyDefinition.builder("property").defaultValue("default").build());
    propertyDb.insertProperties(null, null, null, // The property is overriding default value
    null, newGlobalPropertyDto().setKey("property").setValue("one"));
    ValuesWsResponse result = executeRequestForGlobalProperties("property");
    assertThat(result.getSettingsList()).hasSize(1);
    assertSetting(result.getSettings(0), "property", "one", false);
}
Also used : ValuesWsResponse(org.sonarqube.ws.Settings.ValuesWsResponse) Test(org.junit.Test)

Aggregations

ValuesWsResponse (org.sonarqube.ws.Settings.ValuesWsResponse)46 Test (org.junit.Test)43 Settings (org.sonarqube.ws.Settings)25 MapSettings (org.sonar.api.config.internal.MapSettings)18 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 PipedInputStream (java.io.PipedInputStream)2 PipedOutputStream (java.io.PipedOutputStream)2 ComponentDto (org.sonar.db.component.ComponentDto)2 Setting (org.sonarqube.ws.Settings.Setting)2 SonarLintWsClient (org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient)2 CheckForNull (javax.annotation.CheckForNull)1 PropertyDefinition (org.sonar.api.config.PropertyDefinition)1 Profiler (org.sonar.api.utils.log.Profiler)1 WsActionTester (org.sonar.server.ws.WsActionTester)1 Value (org.sonarqube.ws.Settings.FieldValues.Value)1 GetRequest (org.sonarqube.ws.client.GetRequest)1 GlobalProperties (org.sonarsource.sonarlint.core.proto.Sonarlint.GlobalProperties)1 Builder (org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleConfiguration.Builder)1 WsResponse (org.sonarsource.sonarlint.core.util.ws.WsResponse)1