Commit df11273a authored by Sheng Wang's avatar Sheng Wang
Browse files

change logs in testing

parent 630cf81a
Pipeline #22112 failed with stages
in 9 minutes and 3 seconds
......@@ -32,7 +32,7 @@ public class EntityUtil {
ClientResponse response = TestUtils.send(getEntityUrl(), path, "PUT", headers, body, "");
Assert.assertEquals(HttpStatus.SC_CREATED, response.getStatus());
Thread.sleep(100);
System.out.println(String.format("created entity: %s-%s", type, id));
System.out.println(String.format("created entity: %s", id));
long version = getVersion(response, type, id);
return version;
}
......@@ -59,7 +59,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("deleted entity: %s-%s", type, id));
System.out.println(String.format("deleted entity: %s", id));
return response;
}
......@@ -68,7 +68,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("purged entity: %s-%s", type, id));
System.out.println(String.format("purged entity: %s", id));
return response;
}
......@@ -87,7 +87,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("deleted entity version: %s-%s:%d", type, id, version));
System.out.println(String.format("deleted entity version: %s:%d", id, version));
return response;
}
......@@ -96,7 +96,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("purged entity version: %s-%s:%d", type, id, version));
System.out.println(String.format("purged entity version: %s:%d", id, version));
return response;
}
......
......@@ -23,11 +23,13 @@ import com.sun.jersey.api.client.ClientResponse;
public class LegalTagUtils {
public static String createRandomName() {
return TenantUtils.getTenantName() + "-storage-" + System.currentTimeMillis();
return TenantUtils.getTenantName() + "-entity-" + System.currentTimeMillis();
}
public static ClientResponse create(String legalTagName, String token) throws Exception {
return create("US", legalTagName, "2099-01-25", "Public Domain Data", token);
ClientResponse response = create("US", legalTagName, "2099-01-25", "Public Domain Data", token);
System.out.println(String.format("created legal tag: %s", legalTagName));
return response;
}
protected static ClientResponse create(String countryOfOrigin, String name, String expDate, String dataType, String token)
......@@ -38,7 +40,6 @@ public class LegalTagUtils {
assertEquals(HttpStatus.SC_CREATED, response.getStatus());
Thread.sleep(100);
System.out.println(String.format("created legal tag: %s", name));
return response;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment