Initial
This commit is contained in:
@@ -15,6 +15,7 @@ const {
|
||||
normalizeBaseUrl,
|
||||
normalizeVCenterVm,
|
||||
previewVCenterHosts,
|
||||
retrievePropertiesBody,
|
||||
settingsFromVCenterConnection,
|
||||
vmMatchesFilter
|
||||
} = {
|
||||
@@ -155,8 +156,22 @@ test('standalone VMware host connections use the Web Services profile', async ()
|
||||
assert.equal(preview.candidates[0].powerState, 'POWERED_ON');
|
||||
});
|
||||
|
||||
test('standalone VMware RetrievePropertiesEx SOAP closes boolean fields before paths', () => {
|
||||
const body = retrievePropertiesBody(
|
||||
{ type: 'PropertyCollector', value: 'ha-property-collector' },
|
||||
{ type: 'ContainerView', value: 'session-vm-view' },
|
||||
5
|
||||
);
|
||||
|
||||
assert.match(body, /<all>false<\/all><pathSet>name<\/pathSet>/);
|
||||
assert.match(body, /<skip>true<\/skip><selectSet/);
|
||||
assert.match(body, /<skip>false<\/skip><\/selectSet>/);
|
||||
assert.doesNotMatch(body, /<all>false><pathSet/);
|
||||
assert.doesNotMatch(body, /<skip>false><\/selectSet>/);
|
||||
});
|
||||
|
||||
test('standalone VMware VM candidates build managed host payloads', async () => {
|
||||
const { restore } = installStandaloneEsxiSoapStub();
|
||||
const { calls, restore } = installStandaloneEsxiSoapStub();
|
||||
const connection = {
|
||||
id: 'vc_host',
|
||||
name: 'ESXi 01',
|
||||
@@ -187,6 +202,10 @@ test('standalone VMware VM candidates build managed host payloads', async () =>
|
||||
assert.ok(payload.tags.includes('esxi-vm:vim.VirtualMachine:101'));
|
||||
assert.equal(power.checked, true);
|
||||
assert.equal(power.state, 'POWERED_ON');
|
||||
const powerBody = calls.filter((call) => call.body.includes('<RetrievePropertiesEx')).at(-1)?.body || '';
|
||||
assert.match(powerBody, /<all>false<\/all><pathSet>runtime\.powerState<\/pathSet>/);
|
||||
assert.match(powerBody, /<skip>false<\/skip><\/objectSet>/);
|
||||
assert.doesNotMatch(powerBody, /<all>false><pathSet/);
|
||||
});
|
||||
|
||||
test('standalone VMware SOAP retries alternate endpoint paths after /sdk 404', async () => {
|
||||
|
||||
Reference in New Issue
Block a user