Skip to content

Commit ef722ad

Browse files
committed
testing
1 parent d58d672 commit ef722ad

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@
222222
</configuration>
223223
<executions>
224224
<execution>
225+
<id>prepare-agent</id>
225226
<goals>
226227
<goal>prepare-agent</goal>
227228
</goals>
@@ -233,6 +234,26 @@
233234
<goal>report</goal>
234235
</goals>
235236
</execution>
237+
<execution>
238+
<id>check</id>
239+
<goals>
240+
<goal>check</goal>
241+
</goals>
242+
<configuration>
243+
<rules>
244+
<rule>
245+
<element>PACKAGE</element>
246+
<limits>
247+
<limit>
248+
<counter>LINE</counter>
249+
<value>COVEREDRATIO</value>
250+
<minimum>0.80</minimum>
251+
</limit>
252+
</limits>
253+
</rule>
254+
</rules>
255+
</configuration>
256+
</execution>
236257
</executions>
237258
</plugin>
238259
<plugin>

src/test/java/com/example/lostnfound/LostnFoundApplicationTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
import org.junit.jupiter.api.Disabled;
44
import org.junit.jupiter.api.Test;
55
import org.springframework.boot.test.context.SpringBootTest;
6+
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
67

78
@SpringBootTest
8-
@Disabled()
99
class LostnFoundApplicationTests {
1010

1111
@Test
12+
@Disabled("Disabled to avoid requiring DB connection for CI/CD")
1213
void contextLoads() {
13-
//There will be no test cases in this project till now
14-
14+
assertDoesNotThrow(() -> {
15+
// If context loads successfully, this test will pass
16+
});
1517
}
16-
1718
}

0 commit comments

Comments
 (0)