Skip to content

Commit

Permalink
cov config
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 18, 2024
1 parent 6281e3e commit 473047a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
brew install mysql
brew tap homebrew/services
brew services start mysql
mysqladmin --user=root password 'root'
mysqladmin --user=root --host=localhost password 'root'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions conf.d/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ test:
user: root
password: root

cov:
user: root
password: root

development:
password: StaySafeOutThere
# socketPath: /opt/local/var/run/mysql82/mysqld.sock
11 changes: 8 additions & 3 deletions test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ describe('config', function () {
describe('get', function () {
it(`loads mysql test config`, async function () {
const cfg = await config.get('mysql', 'test')
assert.deepEqual(cfg, mysqlCfg)
assert.deepEqual(cfg, mysqlTestCfg)
})

it(`loads mysql test config syncronously`, function () {
const cfg = config.getSync('mysql', 'test')
assert.deepEqual(cfg, mysqlCfg)
assert.deepEqual(cfg, mysqlTestCfg)
})

it(`loads mysql cov config`, async function () {
const cfg = await config.get('mysql', 'cov')
assert.deepEqual(cfg, mysqlTestCfg)
})

it(`loads session test config`, async function () {
Expand All @@ -27,7 +32,7 @@ describe('config', function () {
})
})

const mysqlCfg = {
const mysqlTestCfg = {
host: '127.0.0.1',
port: 3306,
user: 'root',
Expand Down

0 comments on commit 473047a

Please sign in to comment.