Class CatalogTestCommons
java.lang.Object
org.codice.ddf.itests.common.catalog.CatalogTestCommons
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic voidDeletes a metacard by id and then waits until it has been removed from the catalog before returning.static voiddeleteMetacardUsingCswResponseId(io.restassured.response.Response response) Uses ids within the responses to deletestatic voiddeleteWithBasicAuth(String id, String username, String password) static voiddeleteWithBasicAuth(String id, String username, String password, int expectedStatusCode) static StringIngests the provided metacardstatic StringIngests the provided metacardstatic Stringstatic StringingestCswRecord(String cswRecord) static StringingestGeoJson(String json) static StringingestWithBasicAuth(String data, String mimeType, String username, String password) static StringingestWithBasicAuth(String data, String mimeType, String username, String password, int expectedStatusCode) static StringingestXmlFromResourceAndWait(String resourceName) Ingests an xml resource by name.static Stringstatic Stringstatic StringqueryWithBasicAuth(String id, String transformer, String username, String password) static StringqueryWithBasicAuth(String id, String transformer, String username, String password, int expectedStatusCode) static <T> TretryAssertionErrorCall(Supplier<T> call, int retries, int waitPeriodSec) static voidstatic voidstatic voidstatic voidupdateWithBasicAuth(String id, String data, String mimeType, String username, String password, int expectedStatusCode)
-
Field Details
-
TRANSFORMER_XML
- See Also:
-
-
Method Details
-
ingest
Ingests the provided metacard- Parameters:
data- - body of the message containing metacard to be ingestedmimeType- - content type header value- Returns:
- id of ingested metacard
-
ingest
Ingests the provided metacard- Parameters:
data- - body of the message containing metacard to be ingestedmimeType- - content type header valuecheckResponse- - assert status code is 201- Returns:
- id of ingested metacard
-
ingest
- Parameters:
data- - body of the message containing metacard to be ingestedmimeType- - content type header valueexpectedStatusCode- - expected status code to check for- Returns:
- id of ingested metacard
-
ingestWithBasicAuth
public static String ingestWithBasicAuth(String data, String mimeType, String username, String password) - Parameters:
data- - body of the message containing metacard to be ingestedmimeType- - content type header valueusername- - username of auth userpassword- - password of auth user- Returns:
- id of ingested metacard
-
ingestWithBasicAuth
public static String ingestWithBasicAuth(String data, String mimeType, String username, String password, int expectedStatusCode) - Parameters:
data- - body of the message containing metacard to be ingestedmimeType- - content type header valueusername- - username of auth userpassword- - password of auth userexpectedStatusCode- - expected status code to check for- Returns:
- id of ingested metacard
-
ingestXmlFromResourceAndWait
Ingests an xml resource by name. Does not return until resource has been verified to be in the catalog- Parameters:
resourceName- - The relative path of the resource file- Returns:
- metacard id
-
retryAssertionErrorCall
-
ingestGeoJson
-
ingestCswRecord
-
query
- Parameters:
id- - id of metacard to querytransformer- - transformer to use for response
-
query
- Parameters:
id- - id of metacard to querytransformer- - transformer to use for responseexpectedStatusCode- - expected status code to check for
-
queryWithBasicAuth
public static String queryWithBasicAuth(String id, String transformer, String username, String password) - Parameters:
id- - id of metacard to querytransformer- - transformer to use for responseusername- - username of auth userpassword- - password of auth user
-
queryWithBasicAuth
public static String queryWithBasicAuth(String id, String transformer, String username, String password, int expectedStatusCode) - Parameters:
id- - id of metacard to querytransformer- - transformer to use for responseusername- - username of auth userpassword- - password of auth userexpectedStatusCode- - expected status code to check for
-
update
- Parameters:
id- - id of metacard to updatedata- - body of request to update withmimeType- - content type header value
-
update
- Parameters:
id- - id of metacard to updatedata- - body of request to update withmimeType- - content type header valueexpectedStatusCode- - expected status code to check for
-
updateWithBasicAuth
public static void updateWithBasicAuth(String id, String data, String mimeType, String username, String password) - Parameters:
id- - id of metacard to updatemimeType- - content type header valueusername- - username of auth userpassword- - password of auth user
-
updateWithBasicAuth
public static void updateWithBasicAuth(String id, String data, String mimeType, String username, String password, int expectedStatusCode) - Parameters:
id- - id of metacard to updatemimeType- - content type header valueusername- - username of auth userpassword- - password of auth userexpectedStatusCode- - expected status code to check for
-
delete
- Parameters:
id- - id of metacard to update
-
delete
- Parameters:
id- - id of metacard to updateexpectedStatusCode- - expected status code to check for
-
deleteWithBasicAuth
- Parameters:
id- - id of metacard to updateusername- - username of auth userpassword- - password of auth user
-
deleteWithBasicAuth
public static void deleteWithBasicAuth(String id, String username, String password, int expectedStatusCode) - Parameters:
id- - id of metacard to updateusername- - username of auth userpassword- - password of auth userexpectedStatusCode- - expected status code to check for
-
deleteMetacardAndWait
Deletes a metacard by id and then waits until it has been removed from the catalog before returning.- Parameters:
id- metacard id to delete
-
deleteMetacardUsingCswResponseId
public static void deleteMetacardUsingCswResponseId(io.restassured.response.Response response) throws IOException, XPathExpressionException Uses ids within the responses to delete- Parameters:
response- - response with ids of metacards to delete- Throws:
IOExceptionXPathExpressionException
-