Skip to content

Commit 04a3fcc

Browse files
committed
test: drop invalid tests
1 parent f8f54f4 commit 04a3fcc

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

test/integration/client/appname-tests.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,6 @@ suite.test('application_name has precedence over fallback_application_name', fun
6464
})
6565
})
6666

67-
suite.test('application_name from connection string', function (done) {
68-
var appName = 'my app'
69-
var conParams = require(__dirname + '/../../../lib/connection-parameters')
70-
var conf
71-
if (process.argv[2]) {
72-
conf = new conParams(process.argv[2] + '?application_name=' + appName)
73-
} else {
74-
conf = 'postgres://?application_name=' + appName
75-
}
76-
getAppName(conf, function (res) {
77-
assert.strictEqual(res, appName)
78-
done()
79-
})
80-
})
81-
8267
// TODO: make the test work for native client too
8368
if (!helper.args.native) {
8469
suite.test('application_name is read from the env', function (done) {

test/unit/client/configuration-tests.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ test('initializing from a config string', function () {
7777
assert.equal(client.database, 'databasename')
7878
})
7979

80-
test('uses the correct values from the config string with space in password', function () {
81-
var client = new Client('postgres://brian:pass word@host1:333/databasename')
82-
assert.equal(client.user, 'brian')
83-
assert.equal(client.password, 'pass word')
84-
assert.equal(client.host, 'host1')
85-
assert.equal(client.port, 333)
86-
assert.equal(client.database, 'databasename')
87-
})
88-
8980
test('when not including all values the defaults are used', function () {
9081
var client = new Client('postgres://host1')
9182
assert.equal(client.user, process.env['PGUSER'] || process.env.USER)

test/unit/connection-parameters/creation-tests.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ test('ConnectionParameters initializing from config and config.connectionString'
8989
assert.equal(subject2.ssl, true)
9090
assert.equal(subject3.ssl, true)
9191
assert.equal(subject4.ssl, true)
92-
});
93-
94-
test('escape spaces if present', function () {
95-
var subject = new ConnectionParameters('postgres://localhost/post gres')
96-
assert.equal(subject.database, 'post gres')
9792
})
9893

9994
test('do not double escape spaces', function () {
@@ -232,27 +227,6 @@ test('libpq connection string building', function () {
232227

233228
test('password contains < and/or > characters', function () {
234229
return false
235-
var sourceConfig = {
236-
user: 'brian',
237-
password: 'hello<ther>e',
238-
port: 5432,
239-
host: 'localhost',
240-
database: 'postgres'
241-
}
242-
var connectionString = 'postgres://' + sourceConfig.user + ':' + sourceConfig.password + '@' + sourceConfig.host + ':' + sourceConfig.port + '/' + sourceConfig.database
243-
var subject = new ConnectionParameters(connectionString)
244-
assert.equal(subject.password, sourceConfig.password)
245-
})
246-
247-
test('username or password contains weird characters', function () {
248-
var defaults = require('../../../lib/defaults')
249-
defaults.ssl = true
250-
var strang = 'pg://my f%irst name:is&%awesome!@localhost:9000'
251-
var subject = new ConnectionParameters(strang)
252-
assert.equal(subject.user, 'my f%irst name')
253-
assert.equal(subject.password, 'is&%awesome!')
254-
assert.equal(subject.host, 'localhost')
255-
assert.equal(subject.ssl, true)
256230
})
257231

258232
test('url is properly encoded', function () {

0 commit comments

Comments
 (0)