Skip to content

Commit

Permalink
Password default change to empty string (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
sitingren authored Feb 20, 2024
1 parent df92e11 commit b61bfb4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
name: Node.js ${{ matrix.node }} (${{ matrix.os }})
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Ensure that the applicable environment variables are configured for connecting t
- V_HOST: 'localhost'
- V_PORT: 5433
- V_USER: process.env.USER/USERNAME
- V_PASSWORD: null
- V_PASSWORD: ''
- V_DATABASE: ''
- V_BACKUP_SERVER_NODE: ''

Expand Down
2 changes: 1 addition & 1 deletion packages/vertica-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Ensure that the applicable environment variables are configured for connecting t
- V_HOST: 'localhost'
- V_PORT: 5433
- V_USER: process.env.USER/USERNAME
- V_PASSWORD: null
- V_PASSWORD: ''
- V_DATABASE: ''
- V_BACKUP_SERVER_NODE: ''

Expand Down
2 changes: 1 addition & 1 deletion packages/vertica-nodejs/lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
database: '',

// database user's password
password: null,
password: '',

// a Postgres connection string to be used instead of setting individual connection items
// NOTE: Setting this value will cause it to override any other value (such as database or user) defined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ suite.test('default values are used in new clients', function () {
assert.same(vertica.defaults, {
user: process.env.USER,
database: '',
password: null,
password: '',
port: 5433,
rows: 0,
max: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ var Server = function (response) {
this.response = response
}

let port = 54321
let port = 5433
Server.prototype.start = function (cb) {
// this is our fake postgres server
// this is our fake vertica server
// it responds with our specified response immediatley after receiving every buffer
// this is sufficient into convincing the client its connectet to a valid backend
// this is sufficient into convincing the client its connect to a valid backend
// if we respond with a readyForQuery message
this.server = net.createServer(
function (socket) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test('initializing from a config string', function () {
test('when not including all values the defaults are used', function () {
var client = new Client('postgres://host1')
assert.equal(client.user, process.env['V_USER'] || process.env.USER)
assert.equal(client.password, process.env['V_PASSWORD'] || null)
assert.equal(client.password, process.env['V_PASSWORD'] || '')
assert.equal(client.host, 'host1')
assert.equal(client.port, process.env['V_PORT'] || 5433)
assert.equal(client.database, process.env['V_DATABASE'] || '')
Expand Down

0 comments on commit b61bfb4

Please sign in to comment.