Commit 615521cf authored by Ankur Rawat's avatar Ankur Rawat
Browse files

updated create legal test

parent c97735b6
Pipeline #81345 failed with stages
in 22 seconds
......@@ -148,7 +148,8 @@ public class TestStorageIntegration extends BaseTestTemplate {
// The Test Ack Subscription gets created if the the test endpoint of actual subscription
// created above receives notification from Notification Service.
// Delete legal tag
LegalTagUtils.delete(LEGAL_TAG, this.testUtils.getAdminToken());
// Create legal tag used in storage record
LegalTagUtils.create(LEGAL_TAG, this.testUtils.getAdminToken());
......@@ -22,7 +22,7 @@ import org.apache.http.HttpStatus;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
public class LegalTagUtils {
public static ClientResponse create(String legalTagName, String token) throws Exception {
......@@ -35,7 +35,7 @@ public class LegalTagUtils {
Map<String, String> headers = new HashMap<>();
headers.put("Data-Partition-Id", TestUtils.getOsduTenant());
ClientResponse response = TestUtils.send(getLegalUrl(), "legaltags", "POST", token, body, "", headers, false);
assertEquals(HttpStatus.SC_CREATED, response.getStatus());
assertTrue(response.getStatus()==HttpStatus.SC_CREATED ||response.getStatus()==HttpStatus.SC_CONFLICT );
return response;
Supports Markdown
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