-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
81 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,6 @@ | |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
|
||
import java.net.URI; | ||
import java.net.http.HttpClient; | ||
import java.net.http.HttpRequest; | ||
|
@@ -42,11 +40,11 @@ | |
|
||
/** | ||
* The integration tests for Jobs. | ||
* | ||
* | ||
* @author Manfred Riem ([email protected]) | ||
*/ | ||
class JobIT { | ||
|
||
@Test | ||
void testCreate() throws Exception { | ||
HttpClient client = HttpClient.newHttpClient(); | ||
|
@@ -59,7 +57,7 @@ void testCreate() throws Exception { | |
System.out.println(response.body()); | ||
assertTrue(response.body().trim().length() > 0); | ||
} | ||
|
||
@Test | ||
void testList() throws Exception { | ||
HttpClient client = HttpClient.newHttpClient(); | ||
|
@@ -70,4 +68,16 @@ void testList() throws Exception { | |
System.out.println(response.body()); | ||
assertTrue(response.body().trim().length() > 0); | ||
} | ||
|
||
@Test | ||
void testExecute() throws Exception { | ||
HttpClient client = HttpClient.newHttpClient(); | ||
HttpRequest request = HttpRequest | ||
.newBuilder(new URI("http://localhost:8080/rest/job/test/execute")) | ||
.POST(BodyPublishers.noBody()) | ||
.build(); | ||
HttpResponse<String> response = client.send(request, BodyHandlers.ofString()); | ||
System.out.println(response.body()); | ||
assertTrue(response.body().trim().length() > 0); | ||
} | ||
} |