Nacos-embedded provides easy way to run Nacos in integration tests. Inspired by embedded-consul.
Compatible with jdk1.8+. Working on all operating systems: Mac(Intel & Apple silicon), Linux, Windows.
<dependency>
<groupId>name.jervyshi</groupId>
<artifactId>nacos-embedded</artifactId>
<version>0.3.0</version>
<scope>test</scope>
</dependency>
public class IntegrationTest {
private NacosProcess nacosProcess;
@Before
public void setup() {
nacosProcess = NacosStarterBuilder.nacosStarter().build().start();
}
@After
public void cleanup() throws Exception {
nacosProcess.close();
}
/* tests with nacos client */
}