Arc april updates (#15237)

* 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

* Update min azdata version

Co-authored-by: nasc17 <69922333+nasc17@users.noreply.github.com>
Co-authored-by: nasc17 <nasc@microsoft.com>
This commit is contained in:
Charles Gagnon
2021-04-26 16:20:27 -07:00
committed by GitHub
parent 1e42f0b923
commit ef57812a95
13 changed files with 322 additions and 343 deletions

View File

@@ -16,90 +16,7 @@ import { PostgresConnectionStringsPage } from '../../../ui/dashboards/postgres/p
import { AzureArcTreeDataProvider } from '../../../ui/tree/azureArcTreeDataProvider';
import { FakeControllerModel } from '../../mocks/fakeControllerModel';
import { FakeAzdataApi } from '../../mocks/fakeAzdataApi';
export const FakePostgresServerShowOutput: azdataExt.AzdataOutput<azdataExt.PostgresServerShowResult> = {
logs: [],
stdout: [],
stderr: [],
result: {
apiVersion: 'version',
kind: 'postgresql',
metadata: {
creationTimestamp: '',
generation: 1,
name: 'pgt',
namespace: 'ns',
resourceVersion: '',
selfLink: '',
uid: '',
},
spec: {
engine: {
extensions: [{ name: '' }],
settings: {
default: { ['']: '' }
},
version: '12'
},
scale: {
shards: 0,
workers: 0
},
scheduling: {
default: {
resources: {
requests: {
cpu: '',
memory: ''
},
limits: {
cpu: '',
memory: ''
}
}
}
},
service: {
type: '',
port: 0
},
storage: {
data: {
className: '',
size: ''
},
logs: {
className: '',
size: ''
},
backups: {
className: '',
size: ''
}
}
},
status: {
externalEndpoint: '127.0.0.1:5432',
readyPods: '',
state: '',
logSearchDashboard: '',
metricsDashboard: '',
podsStatus: [{
conditions: [{
lastTransitionTime: '',
message: '',
reason: '',
status: '',
type: '',
}],
name: '',
role: '',
}]
}
}
};
import { FakePostgresServerShowOutput } from '../../models/postgresModel.test';
describe('postgresConnectionStringsPage', function (): void {
let controllerModel: ControllerModel;
@@ -150,7 +67,7 @@ describe('postgresConnectionStringsPage', function (): void {
// Call to provide external endpoint
await postgresModel.refresh();
let endpoint = FakePostgresServerShowOutput.result.status.externalEndpoint.split(':');
let endpoint = FakePostgresServerShowOutput.result.status.primaryEndpoint.split(':');
postgresConnectionStrings['getConnectionStrings']().forEach(k => {
should(k.value.includes(endpoint[0])).be.True();