Skip to content

Commit

Permalink
Fixed test file
Browse files Browse the repository at this point in the history
Signed-off-by: Somesh Gupta <someshgupta987@gmail.com>
  • Loading branch information
aasom143 committed Aug 31, 2024
1 parent f689a76 commit 6381e77
Showing 1 changed file with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,23 @@
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
import org.opensearch.action.admin.indices.stats.IndicesStatsResponse;
import org.opensearch.cluster.ClusterName;
import org.junit.Before;
import org.junit.Test;
import org.opensearch.test.OpenSearchTestCase;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

public class CatShardsResponseTests {
public class CatShardsResponseTests extends OpenSearchTestCase {

private CatShardsResponse catShardsResponse;
private final CatShardsResponse catShardsResponse = new CatShardsResponse();

@Before
public void setUp() {
catShardsResponse = new CatShardsResponse();
}

@Test
public void testGetAndSetClusterStateResponse() {
assertNull(catShardsResponse.getClusterStateResponse());

ClusterName clusterName = new ClusterName("1");
ClusterStateResponse clusterStateResponse = new ClusterStateResponse(clusterName, null, false);
catShardsResponse.setClusterStateResponse(clusterStateResponse);

assertEquals(clusterStateResponse, catShardsResponse.getClusterStateResponse());
}

@Test
public void testGetAndSetIndicesStatsResponse() {
assertNull(catShardsResponse.getIndicesStatsResponse());

final IndicesStatsResponse indicesStatsResponse = new IndicesStatsResponse(null, 0, 0, 0, null);
catShardsResponse.setIndicesStatsResponse(indicesStatsResponse);

Expand Down

0 comments on commit 6381e77

Please sign in to comment.