Skip to content
Merged

WIP #157

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ concurrency:
jobs:
ci:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-22.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 5
steps:
- name: 📥 Checkout repository
Expand All @@ -23,7 +27,7 @@ jobs:
- name: 🟢 Setup Node.js runtime
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
node-version: '24.x'
check-latest: true

- name: 🧪 Run tests
Expand Down
4 changes: 2 additions & 2 deletions bin/m
Original file line number Diff line number Diff line change
Expand Up @@ -983,9 +983,9 @@ get_distro_and_arch() {
ubuntu-16*) distros="ubuntu1604 ubuntu1404" ;;
ubuntu-18*) distros="ubuntu1804 ubuntu1604" ;;
ubuntu-20*) distros="ubuntu2004 ubuntu1804" ;;
ubuntu-22*) distros="ubuntu2204 ubuntu2004" ;;
ubuntu-22*) distros="ubuntu2204 ubuntu2004 ubuntu1804" ;; # see #156
ubuntu-24*) distros="ubuntu2404 ubuntu2204 ubuntu2004" ;;
ubuntu-*) distros="ubuntu2404 ubuntu2204" ;;
ubuntu-*) distros="ubuntu2404 ubuntu2204 ubuntu2004" ;;

linuxmint-17*) distros="ubuntu1404" ;;
linuxmint-18*) distros="ubuntu1604" ;;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"/SECURITY.md"
],
"scripts": {
"test": "node test/suite.mjs"
"test": "node test/suite.mjs --test-only"
},
"keywords": [
"mongodb",
Expand Down
14 changes: 13 additions & 1 deletion test/suite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function run(args = [], opts = {}) {
const env = {
...process.env,
M_CACHE: '0',
M_DEBUG: '0',
...opts.env ?? {},
M_PREFIX,
M_CONFIRM: '0',
Expand Down Expand Up @@ -217,6 +216,19 @@ describe('m - MongoDB Version Management', { concurrency: 5 }, () => {
assert.equal(result.exitCode, 0);
assert.match(result.stdout, new RegExp(`Removed MongoDB version ${version}`, 'i'));
});

if (process.env.ImageOS === 'ubuntu22') {
test('mongo 4.2 installs on ubuntu22 - #156', async () => {
const version = '4.2';
const result1 = await run([version], { env: { M_DEBUG: '1' } });
console.log('debug\n', result1.stderr.split('\n').map(l => ` ${l}`).join('\n'));
assert.match(result1.stdout, new RegExp(`Activating: MongoDB Server ${version}`, 'i'));
assert.equal(result1.exitCode, 0);
const result2 = await run();
assert.match(result2.stdout, new RegExp(version, 'i'));
assert.equal(result2.exitCode, 0);
})
}
});

describe('Source URL Commands', () => {
Expand Down