Commit 81039f00 authored by abbenhoumi's avatar abbenhoumi

Merge branch 'feature/gitlab_ci' into 'master'

Feature/gitlab ci

See merge request !4
parents 5edd0c23 6806095b
Pipeline #5999 failed with stages
in 1 minute and 13 seconds
image: maven:latest
stages:
- build
- test
- run
cache:
paths:
- .m2/repository/
- target/
build:
stage: build
script:
- mvn compile
test:
stage: test
script:
echo "test"
run:
stage: run
script:
- mvn package
- mvn exec:java -Dexec.mainClass="isima.F2.RamassagePoubleDepotApplicationTests"
package isima.F2;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
class RamassagePoubleDepotApplicationTests {
@LocalServerPort
private int port;
@Autowired
private TestRestTemplate restTemplate;
@Test
public void testRunServerRamassageAppTest() throws Exception {
assertThat(this.restTemplate.getForObject("http://localhost:" + port + "/",
String.class)).isNotEmpty();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment