Skip to content

Commit

Permalink
SLCORE-1098 fix condition to use bearer auth starting SQS 10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sophio-japharidze-sonarsource committed Dec 19, 2024
1 parent 9f194f3 commit 4f12ffb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class ServerVersionAndStatusChecker {

private static final String MIN_SQ_VERSION = "9.9";
private static final String MIN_SQ_VERSION_SUPPORTING_BEARER = "10.0";
private static final String MIN_SQ_VERSION_SUPPORTING_BEARER = "10.4";
private final SystemApi systemApi;
private final boolean isSonarCloud;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void it_should_authenticate_preemptively_on_sonarqube_9_9_with_token_and_basic_s
}

@Test
void it_should_authenticate_preemptively_on_sonarqube_10_0_with_token_and_bearer_scheme() {
void it_should_authenticate_preemptively_on_sonarqube_10_4_with_token_and_bearer_scheme() {
var fakeClient = newFakeClient()
.withToken("connectionId", "myToken")
.build();
Expand All @@ -135,7 +135,7 @@ void it_should_authenticate_preemptively_on_sonarqube_10_0_with_token_and_bearer
.setRule(Rules.Rule.newBuilder().setName("newName").setSeverity("INFO").setType(Common.RuleType.BUG).setLang("py").setHtmlNote("extendedDesc from server").build())
.build()))));
sonarqubeMock.stubFor(get("/api/system/status")
.willReturn(aResponse().withStatus(200).withBody("{\"id\": \"20160308094653\",\"version\": \"10.0\",\"status\": " +
.willReturn(aResponse().withStatus(200).withBody("{\"id\": \"20160308094653\",\"version\": \"10.4\",\"status\": " +
"\"UP\"}")));

var details = getEffectiveRuleDetails("scopeId", "python:S139");
Expand Down

0 comments on commit 4f12ffb

Please sign in to comment.