Skip to content

Commit

Permalink
More version tests (#17)
Browse files Browse the repository at this point in the history
* change group id for mvn central repository deploy

* add project name etc and release config

* add more version tests for nacos server

* add usage desc

* fix nacos release version
  • Loading branch information
JervyShi authored Apr 7, 2019
1 parent 263d368 commit 0501b70
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,40 @@
[![codecov](https://codecov.io/gh/jervyshi/nacos-embedded/branch/master/graph/badge.svg)](https://codecov.io/gh/jervyshi/nacos-embedded)

Nacos-embedded provides easy way to run Nacos in integration tests. Inspired by [embedded-consul](https://github.com/pszymczyk/embedded-consul).

Compatible with jdk1.8+.
Working on all operating systems: Mac, Linux, Windows.

## How to get it?

```xml
<dependency>
<groupId>name.jervyshi</groupId>
<artifactId>nacos-embedded</artifactId>
<version>0.2.0</version>
<scope>test</scope>
</dependency>
```

## Usage

### Manual

```java
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 */
}
```
3 changes: 2 additions & 1 deletion src/test/java/name/jervyshi/nacos/NacosStarterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class NacosStarterTest {

@Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] { { "0.8.0" }, { "latest" } });
return Arrays
.asList(new Object[][] { { "0.8.0" }, { "0.9.0" }, { "1.0.0-RC2" }, { "latest" } });
}

@Parameter
Expand Down

0 comments on commit 0501b70

Please sign in to comment.