GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-nodejs-connector
Tedious sample config contains extraneous properties
- Dominant language
- TypeScript
- Stars
- 97
- Forks
- 16
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
## Bug Description
In the current README sample and in `tedious` related system tests there are two properties: `server` and `port` that should not be necessary.
## Example code (or command)
These properties should not be required:
```patch
const clientOpts = await connector.getTediousOptions({
instanceConnectionName: process.env.SQLSERVER_CONNECTION_NAME,
ipType: 'PUBLIC'
});
const connection = new Connection({
- server: '0.0.0.0',
authentication: {
type: 'default',
options: {
userName: process.env.SQLSERVER_USER,
password: process.env.SQLSERVER_PASS,
},
},
options: {
...clientOpts,
- port: 9999,
database: process.env.SQLSERVER_DB,
},
})
```
#### More Info
Currently this properties are required due to a bug in the `tedious` driver itself that still tries to validate these properties even when the user is defining a custom connector factory method.
Related bug in Tedious: https://github.com/tediousjs/tedious/issues/1541
Contributor guide
Assessment
This issue has not been assessed yet.