Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yinjiaqi authored and yinjiaqi committed Jan 23, 2025
1 parent 29190b2 commit 537431f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@

import static org.junit.Assert.assertEquals;

import java.beans.Transient;

public class KnowledgeBaseConfigTest {

private KnowledgeBaseConfig knowledgeBaseConfig;
private KnowledgeBaseConfig.Index index;

@Before
public void setUp() {
index = new KnowledgeBaseConfig.Index("es", "http://localhost:9200", "user", "password");
index = new KnowledgeBaseConfig.Index("es", "clusterId", "user", "password", "bj");
knowledgeBaseConfig = new KnowledgeBaseConfig(index);
}

Expand All @@ -27,8 +29,8 @@ public void testIndexType() {
}

@Test
public void testIndexEsUrl() {
assertEquals("http://localhost:9200", index.getEsUrl());
public void testIndexClusterId() {
assertEquals("clusterId", index.getClusterId());
}

@Test
Expand All @@ -40,4 +42,9 @@ public void testIndexUsername() {
public void testIndexPassword() {
assertEquals("password", index.getPassword());
}

@Test
public void testIndexRegion() {
assertEquals("bj", index.getRegion());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class KnowledgeBaseDetailTest {
@Before
public void setUp() {
knowledgeBaseDetail = new KnowledgeBaseDetail();
knowledgeBaseConfig = new KnowledgeBaseConfig(new KnowledgeBaseConfig.Index("type1", "esUrl", "user", "pass"));
knowledgeBaseConfig = new KnowledgeBaseConfig(new KnowledgeBaseConfig.Index("type1", "clusterId", "user", "pass", "location"));
}

@Test
Expand Down

0 comments on commit 537431f

Please sign in to comment.