mirror of
https://github.com/apache/sqoop.git
synced 2025-05-09 01:50:07 +08:00
SQOOP-2822: Sqoop2: RESTiliency: Provide tests for Link POST action
(Jarek Jarcec Cecho via Colin Ma)
This commit is contained in:
parent
8133192015
commit
93e2dc376d
@ -65,6 +65,26 @@ void validate() throws Exception {
|
||||
assertServerException("Entity requested doesn't exist", "SERVER_0006");
|
||||
assertContains("Invalid connector: i-dont-exists");
|
||||
}}),
|
||||
|
||||
// Post
|
||||
new TestDescription("Empty data", "v1/link", "POST", "", new Validator() {
|
||||
@Override
|
||||
void validate() throws Exception {
|
||||
assertResponseCode(500);
|
||||
assertServerException("Invalid JSON", "SERIALIZATION_002");
|
||||
}}),
|
||||
new TestDescription("Corrupted JSON", "v1/link", "POST", "{\"blah\" : {}", new Validator() {
|
||||
@Override
|
||||
void validate() throws Exception {
|
||||
assertResponseCode(500);
|
||||
assertServerException("Invalid JSON", "SERIALIZATION_002");
|
||||
}}),
|
||||
new TestDescription("Empty JSON", "v1/link", "POST", "{}", new Validator() {
|
||||
@Override
|
||||
void validate() throws Exception {
|
||||
assertResponseCode(500);
|
||||
assertServerException("Required key field is missing", "SERIALIZATION_003");
|
||||
}}),
|
||||
};
|
||||
|
||||
@DataProvider(name="link-rest-test", parallel=false)
|
||||
|
Loading…
Reference in New Issue
Block a user