Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase 1 - Configure, initialize, connect and disconnect clients #139

Open
wants to merge 30 commits into
base: develop
Choose a base branch
from

Conversation

SkeloGH
Copy link
Owner

@SkeloGH SkeloGH commented Nov 8, 2022

Phase 1 - Configure, initialize, connect and disconnect clients

[CLI] run

  • Decouple and create test for params validation
  • Decouple and create test for clients initialization
  • Decouple and create test for Weaver setup and execution

[CLI] clients

Add support for postgres clients

[App] clients

  • WeaverPostgresClient base export
    • constructor
    • _configue
    • connect
    • disconnect
    • _onClientConnect
    • onError

@SkeloGH SkeloGH linked an issue Nov 8, 2022 that may be closed by this pull request

test.skip('client connects', async () => {
const dbClient = await client.connect();
console.log(dbClient);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected console statement no-console

initializeAndSeed,
mockCart,
mockOrder,
mockUser,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'mockUser' is not defined no-undef

disconnect,
initializeAndSeed,
mockCart,
mockOrder,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'mockOrder' is not defined no-undef

module.exports = {
disconnect,
initializeAndSeed,
mockCart,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'mockCart' is not defined no-undef


// const mockUser = { _id: ObjectId('abcdef78901234abcdef1234'), name: 'John', orders: [{ orderId: '4321fedcbafedcba67890123' }] };
// const mockCart = { _id: ObjectId('fedcba67890123fedcba4321'), userId: 'abcdef78901234abcdef1234' };
// const mockOrder = { _id: ObjectId('4321fedcbafedcba67890123'), cartId: 'fedcba67890123fedcba4321' };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 13 exceeds the maximum line length of 100 max-len

let targetClient1;

// const mockUser = { _id: ObjectId('abcdef78901234abcdef1234'), name: 'John', orders: [{ orderId: '4321fedcbafedcba67890123' }] };
// const mockCart = { _id: ObjectId('fedcba67890123fedcba4321'), userId: 'abcdef78901234abcdef1234' };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 12 exceeds the maximum line length of 100 max-len

let sourceClient1;
let targetClient1;

// const mockUser = { _id: ObjectId('abcdef78901234abcdef1234'), name: 'John', orders: [{ orderId: '4321fedcbafedcba67890123' }] };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 11 exceeds the maximum line length of 100 max-len


const CONFIG = require('../config');

const log = logging('Weaver:shared:__tests__');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'log' is assigned a value but never used no-unused-vars

const logging = require('debug');
const ObjectId = require('bson-objectid');

const CONFIG = require('../config');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'CONFIG' is assigned a value but never used no-unused-vars

@@ -0,0 +1,65 @@
const logging = require('debug');
const ObjectId = require('bson-objectid');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'ObjectId' is assigned a value but never used no-unused-vars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phase 1 - PG client initialization
1 participant