mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fixing and enabling some Projects tests (#23261)
* unskipping tests * timeout * bumping STS * adding in exclude nested projectEntry test * cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
||||||
"version": "4.8.0.15",
|
"version": "4.8.0.16",
|
||||||
"downloadFileNames": {
|
"downloadFileNames": {
|
||||||
"Windows_86": "win-x86-net7.0.zip",
|
"Windows_86": "win-x86-net7.0.zip",
|
||||||
"Windows_64": "win-x64-net7.0.zip",
|
"Windows_64": "win-x64-net7.0.zip",
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ describe('ProjectsController', function (): void {
|
|||||||
should(proj.databaseReferences.length).equal(0, 'All database references should have been deleted');
|
should(proj.databaseReferences.length).equal(0, 'All database references should have been deleted');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('Should exclude nested ProjectEntry from node', async function (): Promise<void> {
|
it('Should exclude nested ProjectEntry from node', async function (): Promise<void> {
|
||||||
let proj = await testUtils.createTestSqlProject(this.test);
|
let proj = await testUtils.createTestSqlProject(this.test);
|
||||||
const setupResult = await setupDeleteExcludeTest(proj);
|
const setupResult = await setupDeleteExcludeTest(proj);
|
||||||
const scriptEntry = setupResult[0], projTreeRoot = setupResult[1], preDeployEntry = setupResult[2], postDeployEntry = setupResult[3], noneEntry = setupResult[4];
|
const scriptEntry = setupResult[0], projTreeRoot = setupResult[1], preDeployEntry = setupResult[2], postDeployEntry = setupResult[3], noneEntry = setupResult[4];
|
||||||
@@ -330,14 +330,14 @@ describe('ProjectsController', function (): void {
|
|||||||
should(await utils.exists(noneEntry.fsUri.fsPath)).equal(true, 'none entry pre-deployment script is supposed to still exist on disk');
|
should(await utils.exists(noneEntry.fsUri.fsPath)).equal(true, 'none entry pre-deployment script is supposed to still exist on disk');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('Should exclude a folder', async function (): Promise<void> {
|
it('Should exclude a folder', async function (): Promise<void> {
|
||||||
let proj = await testUtils.createTestSqlProject(this.test);
|
let proj = await testUtils.createTestSqlProject(this.test);
|
||||||
await proj.addScriptItem('SomeFolder\\MyTable.sql', 'CREATE TABLE [NotARealTable]');
|
await proj.addScriptItem('SomeFolder/MyTable.sql', 'CREATE TABLE [NotARealTable]');
|
||||||
|
|
||||||
const projController = new ProjectsController(testContext.outputChannel);
|
const projController = new ProjectsController(testContext.outputChannel);
|
||||||
const projTreeRoot = new ProjectRootTreeItem(proj);
|
const projTreeRoot = new ProjectRootTreeItem(proj);
|
||||||
|
|
||||||
should(await utils.exists(path.join(proj.projectFolderPath, 'SomeFolder\\MyTable.sql'))).be.true('File should exist in original location');
|
should(await utils.exists(path.join(proj.projectFolderPath, 'SomeFolder/MyTable.sql'))).be.true('File should exist in original location');
|
||||||
(proj.sqlObjectScripts.length).should.equal(1, 'Starting number of scripts');
|
(proj.sqlObjectScripts.length).should.equal(1, 'Starting number of scripts');
|
||||||
(proj.folders.length).should.equal(1, 'Starting number of folders');
|
(proj.folders.length).should.equal(1, 'Starting number of folders');
|
||||||
|
|
||||||
@@ -348,7 +348,7 @@ describe('ProjectsController', function (): void {
|
|||||||
// reload project and verify files were renamed
|
// reload project and verify files were renamed
|
||||||
proj = await Project.openProject(proj.projectFilePath);
|
proj = await Project.openProject(proj.projectFilePath);
|
||||||
|
|
||||||
should(await utils.exists(path.join(proj.projectFolderPath, 'SomeFolder\\MyTable.sql'))).be.true('File should still exist on disk');
|
should(await utils.exists(path.join(proj.projectFolderPath, 'SomeFolder', 'MyTable.sql'))).be.true('File should still exist on disk');
|
||||||
(proj.sqlObjectScripts.length).should.equal(0, 'Number of scripts should not have changed');
|
(proj.sqlObjectScripts.length).should.equal(0, 'Number of scripts should not have changed');
|
||||||
(proj.folders.length).should.equal(0, 'Number of folders should not have changed');
|
(proj.folders.length).should.equal(0, 'Number of folders should not have changed');
|
||||||
});
|
});
|
||||||
@@ -1034,15 +1034,15 @@ describe('ProjectsController', function (): void {
|
|||||||
should(await utils.exists(path.join(proj.projectFolderPath, 'postdeployNewName.sql'))).be.true('The moved post deploy script file should exist');
|
should(await utils.exists(path.join(proj.projectFolderPath, 'postdeployNewName.sql'))).be.true('The moved post deploy script file should exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('Should rename a folder', async function (): Promise<void> {
|
it('Should rename a folder', async function (): Promise<void> {
|
||||||
let proj = await testUtils.createTestSqlProject(this.test);
|
let proj = await testUtils.createTestSqlProject(this.test);
|
||||||
await proj.addScriptItem('SomeFolder\\MyTable.sql', 'CREATE TABLE [NotARealTable]');
|
await proj.addScriptItem('SomeFolder/MyTable.sql', 'CREATE TABLE [NotARealTable]');
|
||||||
|
|
||||||
const projController = new ProjectsController(testContext.outputChannel);
|
const projController = new ProjectsController(testContext.outputChannel);
|
||||||
const projTreeRoot = new ProjectRootTreeItem(proj);
|
const projTreeRoot = new ProjectRootTreeItem(proj);
|
||||||
|
|
||||||
sinon.stub(vscode.window, 'showInputBox').resolves('RenamedFolder');
|
sinon.stub(vscode.window, 'showInputBox').resolves('RenamedFolder');
|
||||||
should(await utils.exists(path.join(proj.projectFolderPath, 'SomeFolder\\MyTable.sql'))).be.true('File should exist in original location');
|
should(await utils.exists(path.join(proj.projectFolderPath, 'SomeFolder', 'MyTable.sql'))).be.true('File should exist in original location');
|
||||||
(proj.sqlObjectScripts.length).should.equal(1, 'Starting number of scripts');
|
(proj.sqlObjectScripts.length).should.equal(1, 'Starting number of scripts');
|
||||||
(proj.folders.length).should.equal(1, 'Starting number of folders');
|
(proj.folders.length).should.equal(1, 'Starting number of folders');
|
||||||
|
|
||||||
@@ -1053,7 +1053,7 @@ describe('ProjectsController', function (): void {
|
|||||||
// reload project and verify files were renamed
|
// reload project and verify files were renamed
|
||||||
proj = await Project.openProject(proj.projectFilePath);
|
proj = await Project.openProject(proj.projectFilePath);
|
||||||
|
|
||||||
should(await utils.exists(path.join(proj.projectFolderPath, 'RenamedFolder\\MyTable.sql'))).be.true('File should exist in new location');
|
should(await utils.exists(path.join(proj.projectFolderPath, 'RenamedFolder', 'MyTable.sql'))).be.true('File should exist in new location');
|
||||||
(proj.sqlObjectScripts.length).should.equal(1, 'Number of scripts should not have changed');
|
(proj.sqlObjectScripts.length).should.equal(1, 'Number of scripts should not have changed');
|
||||||
(proj.folders.length).should.equal(1, 'Number of folders should not have changed');
|
(proj.folders.length).should.equal(1, 'Number of folders should not have changed');
|
||||||
should(proj.folders.find(f => f.relativePath === 'RenamedFolder') !== undefined).be.true('The folder path should have been updated');
|
should(proj.folders.find(f => f.relativePath === 'RenamedFolder') !== undefined).be.true('The folder path should have been updated');
|
||||||
|
|||||||
Reference in New Issue
Block a user