Skip to content

Commit

Permalink
Fix travis connect test
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed May 13, 2019
1 parent c906499 commit f47cec0
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,24 @@ public void cleanup() {

@Test
public void create() {
String path1 = ConnectRepository.class.getClassLoader().getResource("application.yml").getPath();
String path2 = ConnectRepository.class.getClassLoader().getResource("logback.xml").getPath();

repository.create(
KafkaTestCluster.CLUSTER_ID,
"ConnectRepositoryTest",
ImmutableMap.of(
"connector.class", "FileStreamSinkConnector",
"file", "/etc/hosts",
"file", path1,
"topics", "test-topics1"
)
);


List<ConnectDefinition> all = repository.getDefinitions(KafkaTestCluster.CLUSTER_ID);
assertEquals(1, all.size());

assertEquals("/etc/hosts", repository.getDefinition(
assertEquals(path1, repository.getDefinition(
KafkaTestCluster.CLUSTER_ID,
"ConnectRepositoryTest"
).getConfigs().get("file"));
Expand All @@ -75,12 +79,12 @@ public void create() {
"ConnectRepositoryTest",
ImmutableMap.of(
"connector.class", "FileStreamSinkConnector",
"file", "/etc/resolv.conf ",
"file", path2,
"topics", "test-topics1"
)
);

assertEquals("/etc/resolv.conf ", repository.getDefinition(
assertEquals(path2, repository.getDefinition(
KafkaTestCluster.CLUSTER_ID,
"ConnectRepositoryTest"
).getConfigs().get("file"));
Expand Down

0 comments on commit f47cec0

Please sign in to comment.