Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Kwok <[email protected]>
  • Loading branch information
andy-k-improving committed Nov 27, 2024
1 parent fee8dcc commit 50b960f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
import java.util.concurrent.ExecutionException;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.junit.MockitoJUnitRunner;
import org.opensearch.action.support.PlainActionFuture;
import org.opensearch.client.node.NodeClient;
import org.opensearch.common.action.ActionFuture;
import org.opensearch.core.action.ActionResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public void testValidateNullDataSourceName() {
Assert.assertEquals(1, request.validate().validationErrors().size());
}


/**
* Test validate() against an invalid record,
* Expecting an error being thrown as ipString being null.
Expand All @@ -44,7 +43,6 @@ public void testValidateNullIpString() {
Assert.assertEquals(1, request.validate().validationErrors().size());
}


/**
* Test validate() against an invalid record,
* Expecting an error with size in 2, because both fields are null.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@
package org.opensearch.geospatial.ip2geo.action;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.util.Collections;
import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.opensearch.core.action.ActionListener;
import org.opensearch.core.action.ActionResponse;
Expand Down Expand Up @@ -46,8 +40,7 @@ public void init() {
/**
* When dataSource is provided.
*/
@Test
public void testDoExecute_All_Succeed() {
public void testDoExecuteAllSucceed() {
IpEnrichmentRequest request = new IpEnrichmentRequest("192.168.1.1", "testSource");
action.doExecute(task, request, listener);

Expand Down

0 comments on commit 50b960f

Please sign in to comment.