Rename default owner constant

Signed-off-by: Tomas Dabasinskas <tomas@dabasinskas.net>
This commit is contained in:
Tomas Dabasinskas
2023-02-05 21:14:46 +02:00
parent a866a0a6b6
commit 3b8f0fbf01
5 changed files with 11 additions and 11 deletions
@@ -17,7 +17,7 @@
"repository": {
"type": "git",
"url": "https://github.com/backstage/backstage",
"directory": "catalog-backend-module-puppetdb"
"directory": "plugins/catalog-backend-module-puppetdb"
},
"keywords": [
"backstage",
@@ -25,7 +25,7 @@ import {
ANNOTATION_LOCATION,
ANNOTATION_ORIGIN_LOCATION,
} from '@backstage/catalog-model/';
import { DEFAULT_OWNER, ENDPOINT_NODES } from '../puppet/constants';
import { DEFAULT_ENTITY_OWNER, ENDPOINT_NODES } from '../puppet/constants';
const logger = getVoidLogger();
@@ -110,7 +110,7 @@ describe('PuppetEntityProvider', () => {
description: 'Description 1',
spec: {
type: 'virtual-machine',
owner: DEFAULT_OWNER,
owner: DEFAULT_ENTITY_OWNER,
dependsOn: [],
dependencyOf: [],
},
@@ -129,7 +129,7 @@ describe('PuppetEntityProvider', () => {
description: 'Description 2',
spec: {
type: 'physical-server',
owner: DEFAULT_OWNER,
owner: DEFAULT_ENTITY_OWNER,
dependsOn: [],
dependencyOf: [],
},
@@ -175,7 +175,7 @@ describe('PuppetEntityProvider', () => {
description: 'Description 1',
spec: {
type: 'virtual-machine',
owner: DEFAULT_OWNER,
owner: DEFAULT_ENTITY_OWNER,
dependsOn: [],
dependencyOf: [],
},
@@ -203,7 +203,7 @@ describe('PuppetEntityProvider', () => {
description: 'Description 2',
spec: {
type: 'physical-server',
owner: DEFAULT_OWNER,
owner: DEFAULT_ENTITY_OWNER,
dependsOn: [],
dependencyOf: [],
},
@@ -36,4 +36,4 @@ export const ENDPOINT_NODES = '/pdb/query/v4/nodes';
*
* @public
*/
export const DEFAULT_OWNER = 'unknown';
export const DEFAULT_ENTITY_OWNER = 'unknown';
@@ -18,7 +18,7 @@ import { PuppetDbEntityProviderConfig } from '../providers';
import { PuppetNode } from './types';
import { defaultResourceTransformer } from './transformers';
import { DEFAULT_NAMESPACE } from '@backstage/catalog-model';
import { ANNOTATION_PUPPET_CERTNAME, DEFAULT_OWNER } from './constants';
import { ANNOTATION_PUPPET_CERTNAME, DEFAULT_ENTITY_OWNER } from './constants';
describe('defaultResourceTransformer', () => {
it('should transform a puppet node to a resource entity', async () => {
@@ -75,7 +75,7 @@ describe('defaultResourceTransformer', () => {
},
spec: {
type: 'virtual-machine',
owner: DEFAULT_OWNER,
owner: DEFAULT_ENTITY_OWNER,
dependsOn: [],
dependencyOf: [],
},
@@ -16,7 +16,7 @@
import { ResourceTransformer } from './types';
import { DEFAULT_NAMESPACE, ResourceEntity } from '@backstage/catalog-model';
import { ANNOTATION_PUPPET_CERTNAME, DEFAULT_OWNER } from './constants';
import { ANNOTATION_PUPPET_CERTNAME, DEFAULT_ENTITY_OWNER } from './constants';
/**
* A default implementation of the {@link ResourceTransformer}.
@@ -54,7 +54,7 @@ export const defaultResourceTransformer: ResourceTransformer = async (
},
spec: {
type: type,
owner: DEFAULT_OWNER,
owner: DEFAULT_ENTITY_OWNER,
dependsOn: [],
dependencyOf: [],
},