Skip to content

Commit

Permalink
update test case
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid committed Oct 20, 2023
1 parent 014fc21 commit 8081ef4
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions test/MilvusClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,33 @@ describe(`Milvus client`, () => {
jest.clearAllMocks();
});

it(`should create a grpc client with cert file successfully`, async () => {
const milvusClient = new MilvusClient({
address: IP,
tls: {
rootCertPath: `test/cert/ca.pem`,
privateKeyPath: `test/cert/client.key`,
certChainPath: `test/cert/client.pem`,
serverName: IP,
},
id: '1',
});

expect(milvusClient.client).toBeDefined();
expect(milvusClient.tlsMode).toEqual(2);
expect(milvusClient.clientId).toEqual('1');
});
// it(`should create a grpc client with cert file successfully`, async () => {
// const milvusClient = new MilvusClient({
// address: IP,
// tls: {
// rootCertPath: `test/cert/ca.pem`,
// privateKeyPath: `test/cert/client.key`,
// certChainPath: `test/cert/client.pem`,
// serverName: IP,
// },
// id: '1',
// });

// expect(milvusClient.client).toBeDefined();
// expect(milvusClient.tlsMode).toEqual(2);
// expect(milvusClient.clientId).toEqual('1');
// });

it(`should create a grpc client without SSL credentials when ssl is false`, () => {
const milvusClient = new MilvusClient({
address: IP,
ssl: false,
username: 'username',
password: 'password',
id: '1',
});

expect(milvusClient.clientId).toEqual('1');
expect(milvusClient.client).toBeDefined();
});

Expand Down

0 comments on commit 8081ef4

Please sign in to comment.