mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
Add Azure Function Service Error/Cancel tests (#19758)
* cleanup tests * exit/error scenario tests * remove + from manuallyEnterObjectName * address comments * add resolve for writeFile
This commit is contained in:
@@ -44,7 +44,7 @@ describe('AzureFunctionUtils', function (): void {
|
||||
"Values": {"test1": "test1", "test2": "test2", "test3":"test3"}}`
|
||||
);
|
||||
|
||||
let writeFileStub = sinon.stub(fs.promises, 'writeFile');
|
||||
let writeFileStub = sinon.stub(fs.promises, 'writeFile').resolves();
|
||||
await azureFunctionsUtils.setLocalAppSetting(path.dirname(localSettingsPath), 'test4', 'test4');
|
||||
should(writeFileStub.calledWithExactly(localSettingsPath, `{\n "IsEncrypted": false,\n "Values": {\n "test1": "test1",\n "test2": "test2",\n "test3": "test3",\n "test4": "test4"\n }\n}`)).equals(true, 'writeFile should be called with the correct arguments');
|
||||
});
|
||||
@@ -77,7 +77,7 @@ describe('AzureFunctionUtils', function (): void {
|
||||
);
|
||||
const connectionString = 'testConnectionString';
|
||||
|
||||
let writeFileStub = sinon.stub(fs.promises, 'writeFile');
|
||||
let writeFileStub = sinon.stub(fs.promises, 'writeFile').resolves();
|
||||
await azureFunctionsUtils.addConnectionStringToConfig(connectionString, rootFolderPath);
|
||||
should(writeFileStub.calledWithExactly(localSettingsPath, `{\n "IsEncrypted": false,\n "Values": {\n "test1": "test1",\n "test2": "test2",\n "test3": "test3",\n "SqlConnectionString": "testConnectionString"\n }\n}`)).equals(true, 'writeFile should be called with the correct arguments');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user