+4
-4
@@ -166,10 +166,10 @@ describe('PuppetEntityProvider', () => {
|
||||
[ANNOTATION_PUPPET_CERTNAME]: 'node1',
|
||||
[ANNOTATION_LOCATION]: `url:${config.getString(
|
||||
'catalog.providers.puppetdb.host',
|
||||
)}${ENDPOINT_NODES}/node1`,
|
||||
)}/${ENDPOINT_NODES}/node1`,
|
||||
[ANNOTATION_ORIGIN_LOCATION]: `url:${config.getString(
|
||||
'catalog.providers.puppetdb.host',
|
||||
)}${ENDPOINT_NODES}/node1`,
|
||||
)}/${ENDPOINT_NODES}/node1`,
|
||||
},
|
||||
tags: ['windows'],
|
||||
description: 'Description 1',
|
||||
@@ -194,10 +194,10 @@ describe('PuppetEntityProvider', () => {
|
||||
[ANNOTATION_PUPPET_CERTNAME]: 'node2',
|
||||
[ANNOTATION_LOCATION]: `url:${config.getString(
|
||||
'catalog.providers.puppetdb.host',
|
||||
)}${ENDPOINT_NODES}/node2`,
|
||||
)}/${ENDPOINT_NODES}/node2`,
|
||||
[ANNOTATION_ORIGIN_LOCATION]: `url:${config.getString(
|
||||
'catalog.providers.puppetdb.host',
|
||||
)}${ENDPOINT_NODES}/node2`,
|
||||
)}/${ENDPOINT_NODES}/node2`,
|
||||
},
|
||||
tags: ['linux'],
|
||||
description: 'Description 2',
|
||||
|
||||
@@ -24,12 +24,12 @@ export const ANNOTATION_PUPPET_CERTNAME = 'puppet.com/certname';
|
||||
/**
|
||||
* Path of PuppetDB FactSets endpoint.
|
||||
*/
|
||||
export const ENDPOINT_FACTSETS = '/pdb/query/v4/factsets';
|
||||
export const ENDPOINT_FACTSETS = 'pdb/query/v4/factsets';
|
||||
|
||||
/**
|
||||
* Path of PuppetDB Nodes endpoint.
|
||||
*/
|
||||
export const ENDPOINT_NODES = '/pdb/query/v4/nodes';
|
||||
export const ENDPOINT_NODES = 'pdb/query/v4/nodes';
|
||||
|
||||
/**
|
||||
* Default owner for entities created by the PuppetDB provider.
|
||||
|
||||
@@ -222,7 +222,7 @@ describe('readPuppetNodes', () => {
|
||||
it('should return matched results', async () => {
|
||||
const entities = await readPuppetNodes(config);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
`${config.host}${ENDPOINT_FACTSETS}?query=%5B%22%3D%22%2C+%22certname%22%2C+%22node1%22%5D`,
|
||||
`${config.host}/${ENDPOINT_FACTSETS}?query=%5B%22%3D%22%2C+%22certname%22%2C+%22node1%22%5D`,
|
||||
{
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user