Edit Postgres Engine Settings Per Role (#15481)

* Enables being able to view and edit Coordinator node scheduling params (#15114)

* Trying to save per role settings

* Updated spec

* Cleaning up

* Removed unneccessary code and comments

* Added separate type for { w?: string, c?: string}, PR fixes

* Added methods to refresh mr,ml,cr,cl versus per role

* Fixed spec

* Put back optional properties, removed passing empty string to reset scheduling params

* Spacing

* vBump arc

* Included roles in fake show output for testing (#15196)

* Update arc specs (#15225)

* Update azdata Arc specs to match April azdata

* vcores -> cpu

* fix spacing

* Consolidate types and update storage volumes

* Fix compile

* Fix spec

* include coordinator

* Adding args

* Query call success

* Check for success in query

* List full coordinator params

* Change name

* Update unit test for engine settings

* Pr changes

* Fix query

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
nasc17
2021-05-19 13:46:24 -07:00
committed by GitHub
parent 04ede021f3
commit 02770e21ee
11 changed files with 131 additions and 67 deletions

View File

@@ -19,6 +19,11 @@ import { AzureArcTreeDataProvider } from '../../ui/tree/azureArcTreeDataProvider
import { FakeControllerModel } from '../mocks/fakeControllerModel';
import { FakeAzdataApi } from '../mocks/fakeAzdataApi';
export const FakeStorageVolume: azdataExt.StorageVolume[] = [{
className: '',
size: ''
}];
export const FakePostgresServerShowOutput: azdataExt.AzdataOutput<azdataExt.PostgresServerShowResult> = {
logs: [],
stdout: [],
@@ -39,7 +44,11 @@ export const FakePostgresServerShowOutput: azdataExt.AzdataOutput<azdataExt.Post
engine: {
extensions: [{ name: '' }],
settings: {
default: { ['']: '' }
default: { ['']: '' },
roles: {
coordinator: { ['']: '' },
worker: { ['']: '' }
}
},
version: ''
},
@@ -553,7 +562,7 @@ describe('PostgresModel', function (): void {
sinon.stub(azdata.dataprotocol, 'getProvider').returns(providerMock.object);
await postgresModel.getEngineSettings();
should(postgresModel.workerNodesEngineSettings.pop()).be.match(engineSettingsModelCompare);
should(postgresModel.coordinatorNodeEngineSettings.pop()).be.match(engineSettingsModelCompare);
});
});