Nacos Embedded
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, Linux, Windows.
How to get it?
<dependency>
<groupId>name.jervyshi</groupId>
<artifactId>nacos-embedded</artifactId>
<version>0.2.0</version>
<scope>test</scope>
</dependency>
Usage
Manual
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 */
}