17
17
package org .sonar .python .it ;
18
18
19
19
import com .sonar .orchestrator .build .SonarScanner ;
20
+ import com .sonar .orchestrator .version .Version ;
21
+ import com .sonar .orchestrator .build .SonarScannerInstaller ;
22
+ import com .sonar .orchestrator .config .Configuration ;
20
23
import com .sonar .orchestrator .junit5 .OrchestratorExtension ;
21
24
import com .sonar .orchestrator .locator .FileLocation ;
22
25
import java .io .File ;
26
29
import org .junit .jupiter .api .BeforeAll ;
27
30
import org .junit .jupiter .api .Test ;
28
31
import org .junit .jupiter .api .extension .RegisterExtension ;
32
+ import org .junit .jupiter .api .parallel .Execution ;
33
+ import org .junit .jupiter .api .parallel .ExecutionMode ;
29
34
import org .sonarsource .analyzer .commons .ProfileGenerator ;
30
35
31
36
import static java .nio .charset .StandardCharsets .UTF_8 ;
32
37
import static org .assertj .core .api .Assertions .assertThat ;
33
38
import static org .sonar .python .it .RulingHelper .getOrchestrator ;
34
39
35
- // Ruling test for bug rules, to ensure they are properly tested without slowing down the CI
40
+ @ Execution ( ExecutionMode . CONCURRENT )
36
41
class PythonRulingTest {
37
42
43
+
38
44
@ RegisterExtension
39
45
public static final OrchestratorExtension ORCHESTRATOR = getOrchestrator ();
46
+ public static final Configuration CONFIGURATION = ORCHESTRATOR .getConfiguration ();
40
47
41
48
private static final String PROFILE_NAME = "rules" ;
42
49
@@ -52,6 +59,11 @@ static void prepare_quality_profile() {
52
59
ORCHESTRATOR .getServer ().restoreProfile (FileLocation .of (iPythonProfileFile ));
53
60
}
54
61
62
+ @ BeforeAll
63
+ static void install_sonar_scanner () {
64
+ new SonarScannerInstaller (CONFIGURATION .locators ()).install (Version .create (SonarScanner .DEFAULT_SCANNER_VERSION ), CONFIGURATION .fileSystem ().workspace ());
65
+ }
66
+
55
67
@ Test
56
68
void test_airflow () throws IOException {
57
69
SonarScanner build = buildWithCommonProperties ("airflow" );
0 commit comments