Skip to content
Snippets Groups Projects
Commit a9293ae0 authored by Bhushan Rade's avatar Bhushan Rade
Browse files

service mesh changes int test

parent 33d30ac5
No related branches found
No related tags found
1 merge request!120service mesh changes int test
Pipeline #80794 failed
......@@ -3,10 +3,14 @@
package org.opengroup.osdu.partition.api;
import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Before;
import org.opengroup.osdu.partition.util.IBMTestUtils;
import com.sun.jersey.api.client.ClientResponse;
public class TestCreatePartition extends CreatePartitionTest {
@Before
......@@ -20,6 +24,14 @@ public class TestCreatePartition extends CreatePartitionTest {
public void tearDown() {
this.testUtils = null;
}
//servicemesh changes response code - 403
@Override
public void should_return401_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
}
......@@ -3,10 +3,14 @@
package org.opengroup.osdu.partition.api;
import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Before;
import org.opengroup.osdu.partition.util.IBMTestUtils;
import com.sun.jersey.api.client.ClientResponse;
public class TestDeletePartition extends DeletePartitionTest {
@Before
......@@ -20,5 +24,12 @@ public class TestDeletePartition extends DeletePartitionTest {
public void tearDown() {
this.testUtils = null;
}
//servicemesh changes response code - 403
@Override
public void should_return401_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
}
......@@ -25,5 +25,12 @@ public class TestGetPartitionById extends GetPartitionByIdApitTest {
public void tearDown() {
this.testUtils = null;
}
//servicemesh changes response code - 403
@Override
public void should_return401_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
}
......@@ -3,10 +3,14 @@
package org.opengroup.osdu.partition.api;
import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Before;
import org.opengroup.osdu.partition.util.IBMTestUtils;
import com.sun.jersey.api.client.ClientResponse;
public class TestListPartitions extends ListPartitionsApitTest {
@Before
......@@ -20,5 +24,13 @@ public class TestListPartitions extends ListPartitionsApitTest {
public void tearDown() {
this.testUtils = null;
}
//servicemesh changes response code - 403
@Override
public void should_return401_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
}
......@@ -25,5 +25,13 @@ public class TestUpdatePartition extends UpdatePartitionTest {
public void tearDown() {
this.testUtils = null;
}
//servicemesh changes response code - 403
@Override
public void should_return401_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment