|
1 | 1 | import { startTestCluster } from '../../../testing/integration-testing-hooks';
|
2 | 2 | import { eventually } from './helpers';
|
| 3 | +import { expect } from 'chai'; |
3 | 4 | import { TestShell } from './test-shell';
|
4 | 5 |
|
5 | 6 | describe('e2e direct connection', () => {
|
@@ -94,6 +95,14 @@ describe('e2e direct connection', () => {
|
94 | 95 | await shell.executeLine('db.runCommand({ listCollections: 1 })');
|
95 | 96 | shell.assertContainsOutput("name: 'system.version'");
|
96 | 97 | });
|
| 98 | + |
| 99 | + it('lists collections and dbs using show by default', async() => { |
| 100 | + const shell = TestShell.start({ args: [`${await rs1.connectionString()}`] }); |
| 101 | + await shell.waitForPrompt(); |
| 102 | + await shell.executeLine('use admin'); |
| 103 | + expect(await shell.executeLine('show collections')).to.include('system.version'); |
| 104 | + expect(await shell.executeLine('show dbs')).to.include('admin'); |
| 105 | + }); |
97 | 106 | });
|
98 | 107 |
|
99 | 108 | context('connecting to primary', () => {
|
@@ -122,6 +131,14 @@ describe('e2e direct connection', () => {
|
122 | 131 | shell.assertContainsOutput(`me: '${await rs0.hostport()}'`);
|
123 | 132 | shell.assertContainsOutput(`setName: '${replSetId}'`);
|
124 | 133 | });
|
| 134 | + |
| 135 | + it('lists collections and dbs using show by default', async() => { |
| 136 | + const shell = TestShell.start({ args: [`${await rs1.connectionString()}`] }); |
| 137 | + await shell.waitForPrompt(); |
| 138 | + await shell.executeLine('use admin'); |
| 139 | + expect(await shell.executeLine('show collections')).to.include('system.version'); |
| 140 | + expect(await shell.executeLine('show dbs')).to.include('admin'); |
| 141 | + }); |
125 | 142 | });
|
126 | 143 | });
|
127 | 144 | });
|
|
0 commit comments