Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
annie-mac committed Feb 29, 2024
1 parent 9dec708 commit dee691d
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import static org.mockito.Mockito.when;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
Expand All @@ -31,6 +32,8 @@
import org.mockito.Mockito;

public class CosmosDBSourceTaskTest {
private final static String COSMOS_EMULATOR_KEY = "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==";
private final static String COSMOS_EMULATOR_HOST = "https://localhost:8081/";
private CosmosDBSourceTask testTask;
private final String topicName = "testtopic";
private final String containerName = "container666";
Expand Down Expand Up @@ -96,9 +99,14 @@ public void setup() throws IllegalAccessException {

}

@Test
@Test(expected = IllegalArgumentException.class)
public void start() {
testTask = new CosmosDBSourceTask();
CosmosDBSourceTask testTask = new CosmosDBSourceTask();
HashMap<String, String> configs = new HashMap<>();
configs.put(CosmosDBSourceConfig.COSMOS_CONN_ENDPOINT_CONF, COSMOS_EMULATOR_HOST);
configs.put(CosmosDBSourceConfig.COSMOS_CONN_KEY_CONF, COSMOS_EMULATOR_KEY);
configs.put(CosmosDBSourceConfig.COSMOS_DATABASE_NAME_CONF, "mydb");
configs.put(CosmosDBSourceConfig.COSMOS_CONTAINER_TOPIC_MAP_CONF, "mytopic5#mycontainer6");
testTask.start(sourceSettings);
}

Expand Down

0 comments on commit dee691d

Please sign in to comment.