Skip to content

Commit

Permalink
Ignore tests that can't run in github CI. (opensearch-project#1118)
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt authored and jowg-amazon committed Jul 2, 2024
1 parent 3a397e3 commit ecf3e0e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import org.opensearch.client.Response;
import org.opensearch.jobscheduler.spi.schedule.IntervalSchedule;
Expand Down Expand Up @@ -100,6 +101,7 @@ public void afterTest() {
s3Client.close();
}

@Ignore
public void testCreateSATIFSourceConfigAndVerifyJobRan() throws IOException, InterruptedException {
// Generate test IOCs, and upload them to S3 to create the bucket object. Feed creation fails if the bucket object doesn't exist.
int numOfIOCs = 1;
Expand Down Expand Up @@ -193,6 +195,7 @@ protected boolean verifyJobRan(String createdId, String firstUpdatedTime) throws
return false;
}

@Ignore
public void testGetSATIFSourceConfigById() throws IOException {
// Generate test IOCs, and upload them to S3 to create the bucket object. Feed creation fails if the bucket object doesn't exist.
int numOfIOCs = 1;
Expand Down Expand Up @@ -258,6 +261,7 @@ public void testGetSATIFSourceConfigById() throws IOException {
Assert.assertTrue("Created ioc types and returned ioc types do not match", iocTypes.containsAll(returnedIocTypes) && returnedIocTypes.containsAll(iocTypes));
}

@Ignore
public void testDeleteSATIFSourceConfig() throws IOException {
// Generate test IOCs, and upload them to S3 to create the bucket object. Feed creation fails if the bucket object doesn't exist.
int numOfIOCs = 1;
Expand Down Expand Up @@ -326,6 +330,7 @@ public void testDeleteSATIFSourceConfig() throws IOException {
Assert.assertEquals(0, hits.size());
}

@Ignore
public void testRetrieveIOCsSuccessfully() throws IOException, InterruptedException {
// Generate test IOCs, and upload them to S3
int numOfIOCs = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import org.opensearch.client.Response;
import org.opensearch.core.rest.RestStatus;
Expand Down Expand Up @@ -90,6 +91,7 @@ public void afterTest() {
s3Client.close();
}

@Ignore
public void testConnection_succeeds() throws IOException {
// Create the test request
request = new TestS3ConnectionRequest(bucketName, objectKey, region, roleArn);
Expand All @@ -107,6 +109,7 @@ public void testConnection_succeeds() throws IOException {
assertTrue(error.isEmpty());
}

@Ignore
public void testConnection_wrongBucket() throws IOException {
// Create the test request
request = new TestS3ConnectionRequest("fakebucket", objectKey, region, roleArn);
Expand All @@ -124,6 +127,7 @@ public void testConnection_wrongBucket() throws IOException {
assertEquals("Resource not found.", error);
}

@Ignore
public void testConnection_wrongKey() throws IOException {
// Create the test request
request = new TestS3ConnectionRequest(bucketName, "fakekey", region, roleArn);
Expand All @@ -141,6 +145,7 @@ public void testConnection_wrongKey() throws IOException {
assertEquals("The specified key does not exist.", error);
}

@Ignore
public void testConnection_wrongRegion() throws IOException {
// Create the test request
String wrongRegion = (Objects.equals(region, "us-west-2")) ? "us-east-1" : "us-west-2";
Expand All @@ -159,6 +164,7 @@ public void testConnection_wrongRegion() throws IOException {
assertEquals("Resource not found.", error);
}

@Ignore
public void testConnection_invalidRegion() throws IOException {
// Create the test request
request = new TestS3ConnectionRequest(bucketName, objectKey, "fa-ke-1", roleArn);
Expand All @@ -176,6 +182,7 @@ public void testConnection_invalidRegion() throws IOException {
assertEquals("Resource not found.", error);
}

@Ignore
public void testConnection_wrongRoleArn() throws IOException {
// Create the test request
request = new TestS3ConnectionRequest(bucketName, objectKey, region, "arn:aws:iam::123456789012:role/iam-fake-role");
Expand All @@ -193,6 +200,7 @@ public void testConnection_wrongRoleArn() throws IOException {
assertTrue(error.contains("is not authorized to perform: sts:AssumeRole on resource"));
}

@Ignore
public void testConnection_invalidRoleArn() throws IOException {
// Create the test request
request = new TestS3ConnectionRequest(bucketName, objectKey, region, "arn:aws:iam::12345:role/iam-invalid-role");
Expand Down

0 comments on commit ecf3e0e

Please sign in to comment.