Skip to content

Commit 373fba1

Browse files
pynicolasalban-auzeill
authored andcommitted
SONARPY-179 Update integration tests
1 parent 02affce commit 373fba1

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

its/plugin/src/test/java/com/sonar/python/it/plugin/CoverageTest.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.junit.ClassRule;
3131
import org.junit.Test;
3232

33-
import static com.sonar.python.it.plugin.Tests.getProjectMeasure;
3433
import static org.assertj.core.api.Assertions.assertThat;
3534

3635
public class CoverageTest {
@@ -59,9 +58,9 @@ private void basic_coverage_reports(String utReportPath) {
5958
orchestrator.executeBuild(build);
6059

6160
ImmutableMap<String, Integer> values = new Builder<String, Integer>()
62-
.put("lines_to_cover", 8)
63-
.put("coverage", 90)
64-
.put("line_coverage", 87)
61+
.put("lines_to_cover", 14)
62+
.put("coverage", 56)
63+
.put("line_coverage", 50)
6564
.put("branch_coverage", 100)
6665
.build();
6766

@@ -123,9 +122,7 @@ public void empty_coverage_report() throws Exception {
123122
}
124123
}
125124
assertThat(nbLog).isEqualTo(3);
126-
assertThat(getProjectMeasure(PROJECT_KEY, "coverage")).isNull();
127-
assertThat(getProjectMeasure(PROJECT_KEY, "it_coverage")).isNull();
128-
assertThat(getProjectMeasure(PROJECT_KEY, "overall_coverage")).isNull();
125+
assertThat(Tests.getMeasureAsDouble(PROJECT_KEY, "coverage")).isZero();
129126
}
130127

131128
}

its/plugin/src/test/java/com/sonar/python/it/plugin/MetricsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void project_level() {
8080
assertThat(getProjectMeasureAsDouble("violations")).isZero();
8181

8282
assertThat(getProjectMeasureAsInt("tests")).isNull();
83-
assertThat(getProjectMeasureAsDouble("coverage")).isNull();
83+
assertThat(getProjectMeasureAsDouble("coverage")).isZero();
8484
}
8585

8686
@Test

0 commit comments

Comments
 (0)