catalog-model: Remove target from EntityRelation type.

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-03-04 10:00:50 +01:00
committed by Fredrik Adelöw
parent 165cabfeb6
commit d3e9ec43b7
40 changed files with 135 additions and 375 deletions
+127
View File
@@ -0,0 +1,127 @@
---
'@backstage/plugin-api-docs': patch
'@backstage/plugin-auth-backend': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-graph': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-fossa': patch
'@backstage/plugin-org': patch
'@backstage/plugin-tech-insights-backend': patch
'@backstage/plugin-techdocs': patch
'@backstage/app-defaults': patch
'@backstage/backend-common': patch
'@backstage/backend-tasks': patch
'@backstage/backend-test-utils': patch
'@backstage/catalog-client': patch
'@backstage/cli': patch
'@backstage/cli-common': patch
'@backstage/codemods': patch
'@backstage/config': patch
'@backstage/config-loader': patch
'@backstage/core-app-api': patch
'@backstage/core-components': patch
'@backstage/core-plugin-api': patch
'@backstage/create-app': patch
'@backstage/dev-utils': patch
'@backstage/errors': patch
'@backstage/integration': patch
'@backstage/integration-react': patch
'@backstage/release-manifests': patch
'@backstage/search-common': patch
'@techdocs/cli': patch
'techdocs-cli-embedded-app': patch
'@backstage/techdocs-common': patch
'@backstage/test-utils': patch
'@backstage/theme': patch
'@backstage/types': patch
'@backstage/version-bridge': patch
'@backstage/plugin-airbrake': patch
'@backstage/plugin-airbrake-backend': patch
'@backstage/plugin-allure': patch
'@backstage/plugin-analytics-module-ga': patch
'@backstage/plugin-apache-airflow': patch
'@backstage/plugin-app-backend': patch
'@backstage/plugin-auth-node': patch
'@backstage/plugin-azure-devops': patch
'@backstage/plugin-azure-devops-backend': patch
'@backstage/plugin-azure-devops-common': patch
'@backstage/plugin-badges': patch
'@backstage/plugin-badges-backend': patch
'@backstage/plugin-bazaar': patch
'@backstage/plugin-bazaar-backend': patch
'@backstage/plugin-bitrise': patch
'@backstage/plugin-catalog-backend-module-aws': patch
'@backstage/plugin-catalog-backend-module-ldap': patch
'@backstage/plugin-catalog-backend-module-msgraph': patch
'@backstage/plugin-catalog-common': patch
'@backstage/plugin-catalog-graphql': patch
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-cicd-statistics': patch
'@backstage/plugin-circleci': patch
'@backstage/plugin-cloudbuild': patch
'@backstage/plugin-code-climate': patch
'@backstage/plugin-code-coverage': patch
'@backstage/plugin-code-coverage-backend': patch
'@backstage/plugin-config-schema': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-explore': patch
'@backstage/plugin-explore-react': patch
'@backstage/plugin-firehydrant': patch
'@backstage/plugin-gcp-projects': patch
'@backstage/plugin-git-release-manager': patch
'@backstage/plugin-github-actions': patch
'@backstage/plugin-github-deployments': patch
'@backstage/plugin-gitops-profiles': patch
'@backstage/plugin-gocd': patch
'@backstage/plugin-graphiql': patch
'@backstage/plugin-graphql-backend': patch
'@backstage/plugin-home': patch
'@backstage/plugin-ilert': patch
'@backstage/plugin-jenkins': patch
'@backstage/plugin-jenkins-backend': patch
'@backstage/plugin-jenkins-common': patch
'@backstage/plugin-kafka': patch
'@backstage/plugin-kafka-backend': patch
'@backstage/plugin-kubernetes': patch
'@backstage/plugin-kubernetes-backend': patch
'@backstage/plugin-kubernetes-common': patch
'@backstage/plugin-lighthouse': patch
'@backstage/plugin-newrelic': patch
'@backstage/plugin-newrelic-dashboard': patch
'@backstage/plugin-pagerduty': patch
'@backstage/plugin-permission-backend': patch
'@backstage/plugin-permission-common': patch
'@backstage/plugin-permission-node': patch
'@backstage/plugin-permission-react': patch
'@backstage/plugin-proxy-backend': patch
'@backstage/plugin-rollbar': patch
'@backstage/plugin-rollbar-backend': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-scaffolder-backend': patch
'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch
'@backstage/plugin-scaffolder-backend-module-rails': patch
'@backstage/plugin-scaffolder-backend-module-yeoman': patch
'@backstage/plugin-scaffolder-common': patch
'@backstage/plugin-search': patch
'@backstage/plugin-search-backend': patch
'@backstage/plugin-search-backend-module-elasticsearch': patch
'@backstage/plugin-search-backend-module-pg': patch
'@backstage/plugin-search-backend-node': patch
'@backstage/plugin-sentry': patch
'@backstage/plugin-shortcuts': patch
'@backstage/plugin-sonarqube': patch
'@backstage/plugin-splunk-on-call': patch
'@backstage/plugin-tech-insights': patch
'@backstage/plugin-tech-insights-backend-module-jsonfc': patch
'@backstage/plugin-tech-insights-common': patch
'@backstage/plugin-tech-insights-node': patch
'@backstage/plugin-tech-radar': patch
'@backstage/plugin-techdocs-backend': patch
'@backstage/plugin-todo': patch
'@backstage/plugin-todo-backend': patch
'@backstage/plugin-user-settings': patch
'@backstage/plugin-xcmetrics': patch
---
Removed usage of `target` for `EntityRelation`s.
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/catalog-model': minor
---
**BREAKING**: Removed the `target` property from `EntityRelation`, use `targetRef` instead.
This means `target: { name: 'team-a', kind: 'group', namespace: 'default' }` is now replaced with `targetRef: 'group:default/team-a'` in entity relations.
@@ -15,7 +15,6 @@
*/
import { JsonObject } from '@backstage/types';
import { CompoundEntityRef } from '../types';
import { EntityStatus } from './EntityStatus';
/**
@@ -185,13 +184,6 @@ export type EntityRelation = {
*/
type: string;
/**
* The target entity of this relation.
*
* @deprecated use targetRef instead
*/
target: CompoundEntityRef;
/**
* The entity ref of the target of this relation.
*/
@@ -94,11 +94,6 @@ describe('<ConsumedApisCard />', () => {
},
relations: [
{
target: {
kind: 'api',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'api:my-namespace/target-name',
type: RELATION_CONSUMES_API,
},
@@ -94,11 +94,6 @@ describe('<HasApisCard />', () => {
},
relations: [
{
target: {
kind: 'api',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'api:my-namespace/target-name',
type: RELATION_HAS_PART,
},
@@ -94,11 +94,6 @@ describe('<ProvidedApisCard />', () => {
},
relations: [
{
target: {
kind: 'api',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'api:my-namespace/target-name',
type: RELATION_PROVIDES_API,
},
@@ -97,11 +97,6 @@ describe('<ConsumingComponentsCard />', () => {
},
relations: [
{
target: {
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_API_CONSUMED_BY,
},
@@ -97,11 +97,6 @@ describe('<ProvidingComponentsCard />', () => {
},
relations: [
{
target: {
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_API_PROVIDED_BY,
},
@@ -80,11 +80,6 @@ describe('CatalogIdentityClient', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/team-a',
target: {
kind: 'group',
namespace: 'default',
name: 'team-a',
},
},
],
},
@@ -102,11 +97,6 @@ describe('CatalogIdentityClient', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:reality/screen-actors-guild',
target: {
kind: 'group',
namespace: 'reality',
name: 'screen-actors-guild',
},
},
],
},
@@ -30,11 +30,6 @@ describe('isEntityOwner', () => {
{
type: 'ownedBy',
targetRef: 'user:default/spiderman',
target: {
kind: 'user',
namespace: 'default',
name: 'spiderman',
},
},
],
};
@@ -54,11 +49,6 @@ describe('isEntityOwner', () => {
{
type: 'ownedBy',
targetRef: 'user:default/green-goblin',
target: {
kind: 'user',
namespace: 'default',
name: 'green-goblin',
},
},
],
};
@@ -14,11 +14,7 @@
* limitations under the License.
*/
import {
Entity,
parseEntityRef,
stringifyEntityRef,
} from '@backstage/catalog-model';
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
import { InputError, NotFoundError } from '@backstage/errors';
import { Knex } from 'knex';
import lodash from 'lodash';
@@ -204,27 +200,6 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog {
entities = entities.map(e => request.fields!(e));
}
// TODO(freben): This is added as a compatibility guarantee, until we can be
// sure that all adopters have re-stitched their entities so that the new
// targetRef field is present on them, and that they have stopped consuming
// the now-removed old field
for (const entity of entities) {
if (entity.relations) {
for (const relation of entity.relations) {
if (!relation.targetRef && relation.target) {
// This is the case where an old-form entity, not yet stitched with
// the updated code, was in the database
relation.targetRef = stringifyEntityRef(relation.target);
} else if (!relation.target && relation.targetRef) {
// This is the case where a new-form entity, stitched with the
// updated code, was in the database but we still want to produce
// the old data shape as well for compatibility reasons
relation.target = parseEntityRef(relation.targetRef);
}
}
}
}
return {
entities,
pageInfo,
@@ -17,7 +17,6 @@
import { ENTITY_STATUS_CATALOG_PROCESSING_TYPE } from '@backstage/catalog-client';
import {
AlphaEntity,
parseEntityRef,
EntityRelation,
EntityStatusItem,
} from '@backstage/catalog-model';
@@ -186,8 +185,6 @@ export class Stitcher {
.filter(row => row.relationType /* exclude null row, if relevant */)
.map<EntityRelation>(row => ({
type: row.relationType!,
// TODO(freben): This field is deprecated and should be removed in a future release
target: parseEntityRef(row.relationTarget!),
targetRef: row.relationTarget!,
}));
if (statusItems.length) {
@@ -143,12 +143,10 @@ describe('buildEntitySearch', () => {
{
type: 't1',
targetRef: 'k:ns/a',
target: { kind: 'k', namespace: 'ns', name: 'a' },
},
{
type: 't2',
targetRef: 'k:ns/b',
target: { kind: 'k', namespace: 'ns', name: 'b' },
},
],
apiVersion: 'a',
@@ -192,12 +190,10 @@ describe('buildEntitySearch', () => {
{
type: 'dup',
targetRef: 'k:ns/a',
target: { kind: 'k', namespace: 'ns', name: 'a' },
},
{
type: 'DUP',
targetRef: 'k:ns/b',
target: { kind: 'k', namespace: 'ns', name: 'b' },
},
],
apiVersion: 'a',
@@ -49,20 +49,10 @@ describe('<EntityRelationsGraph/>', () => {
},
relations: [
{
target: {
kind: 'k',
name: 'a1',
namespace: 'd',
},
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
target: {
kind: 'b',
name: 'c1',
namespace: 'd',
},
targetRef: 'b:d/c1',
type: RELATION_HAS_PART,
},
@@ -77,20 +67,10 @@ describe('<EntityRelationsGraph/>', () => {
},
relations: [
{
target: {
kind: 'b',
name: 'c',
namespace: 'd',
},
targetRef: 'b:d/c',
type: RELATION_OWNED_BY,
},
{
target: {
kind: 'b',
name: 'c1',
namespace: 'd',
},
targetRef: 'b:d/c1',
type: RELATION_OWNED_BY,
},
@@ -105,29 +85,14 @@ describe('<EntityRelationsGraph/>', () => {
},
relations: [
{
target: {
kind: 'b',
name: 'c',
namespace: 'd',
},
targetRef: 'b:d/c',
type: RELATION_PART_OF,
},
{
target: {
kind: 'k',
name: 'a1',
namespace: 'd',
},
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
target: {
kind: 'b',
name: 'c2',
namespace: 'd',
},
targetRef: 'b:d/c2',
type: RELATION_HAS_PART,
},
@@ -142,11 +107,6 @@ describe('<EntityRelationsGraph/>', () => {
},
relations: [
{
target: {
kind: 'b',
name: 'c1',
namespace: 'd',
},
targetRef: 'b:d/c1',
type: RELATION_PART_OF,
},
@@ -44,20 +44,10 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
target: {
kind: 'k',
name: 'a1',
namespace: 'd',
},
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
target: {
kind: 'b',
name: 'c1',
namespace: 'd',
},
targetRef: 'b:d/c1',
type: RELATION_HAS_PART,
},
@@ -72,20 +62,10 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
target: {
kind: 'b',
name: 'c',
namespace: 'd',
},
targetRef: 'b:d/c',
type: RELATION_OWNED_BY,
},
{
target: {
kind: 'b',
name: 'c1',
namespace: 'd',
},
targetRef: 'b:d/c1',
type: RELATION_OWNED_BY,
},
@@ -100,29 +80,14 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
target: {
kind: 'b',
name: 'c',
namespace: 'd',
},
targetRef: 'b:d/c',
type: RELATION_PART_OF,
},
{
target: {
kind: 'k',
name: 'a1',
namespace: 'd',
},
targetRef: 'k:d/a1',
type: RELATION_OWNER_OF,
},
{
target: {
kind: 'b',
name: 'c2',
namespace: 'd',
},
targetRef: 'b:d/c2',
type: RELATION_HAS_PART,
},
@@ -137,11 +102,6 @@ describe('useEntityRelationNodesAndEdges', () => {
},
relations: [
{
target: {
kind: 'b',
name: 'c1',
namespace: 'd',
},
targetRef: 'b:d/c1',
type: RELATION_PART_OF,
},
@@ -32,20 +32,10 @@ const sampleEntities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'group:default/some-owner',
target: {
name: 'some-owner',
namespace: 'default',
kind: 'Group',
},
},
{
type: 'ownedBy',
targetRef: 'group:default/some-owner-2',
target: {
name: 'some-owner-2',
namespace: 'default',
kind: 'Group',
},
},
],
},
@@ -59,11 +49,6 @@ const sampleEntities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'group:default/another-owner',
target: {
name: 'another-owner',
namespace: 'default',
kind: 'Group',
},
},
],
},
@@ -77,11 +62,6 @@ const sampleEntities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'group:default/some-owner',
target: {
name: 'some-owner',
namespace: 'default',
kind: 'Group',
},
},
],
},
@@ -45,20 +45,10 @@ describe('systemEntityColumns', () => {
{
type: RELATION_PART_OF,
targetRef: 'domain:my-namespace/my-domain',
target: {
kind: 'domain',
name: 'my-domain',
namespace: 'my-namespace',
},
},
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/test',
target: {
kind: 'group',
name: 'test',
namespace: 'default',
},
},
],
},
@@ -107,20 +97,10 @@ describe('componentEntityColumns', () => {
{
type: RELATION_PART_OF,
targetRef: 'system:my-namespace/my-system',
target: {
kind: 'system',
name: 'my-system',
namespace: 'my-namespace',
},
},
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/test',
target: {
kind: 'group',
name: 'test',
namespace: 'default',
},
},
],
},
@@ -104,7 +104,6 @@ const backendEntities: Entity[] = [
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/testuser',
target: { kind: 'User', namespace: 'default', name: 'testUser' },
},
],
},
@@ -138,7 +137,6 @@ const backendEntities: Entity[] = [
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/testuser',
target: { kind: 'User', namespace: 'default', name: 'testUser' },
},
],
},
@@ -46,11 +46,6 @@ const entities: Entity[] = [
{
type: 'ownedBy',
targetRef: 'user:default/guest',
target: {
name: 'guest',
namespace: 'default',
kind: 'User',
},
},
],
},
@@ -62,12 +62,10 @@ describe('useEntityOwnership', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/user1',
target: { kind: 'User', namespace: 'default', name: 'user1' },
},
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/group1',
target: { kind: 'Group', namespace: 'default', name: 'group1' },
},
],
};
@@ -32,7 +32,6 @@ describe('getEntityRelations', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/member',
target: { kind: 'group', namespace: 'default', name: 'member' },
},
{
type: RELATION_CHILD_OF,
@@ -53,7 +52,6 @@ describe('getEntityRelations', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/member',
target: { kind: 'group', namespace: 'default', name: 'member' },
},
{
type: RELATION_MEMBER_OF,
@@ -32,7 +32,6 @@ describe('isOwnerOf', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/user',
target: { kind: 'user', namespace: 'default', name: 'user' },
},
],
} as Entity;
@@ -48,7 +47,6 @@ describe('isOwnerOf', () => {
{
type: RELATION_MEMBER_OF,
targetRef: 'group:default/group',
target: { kind: 'group', namespace: 'default', name: 'group' },
},
],
} as Entity;
@@ -57,7 +55,6 @@ describe('isOwnerOf', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/group',
target: { kind: 'group', namespace: 'default', name: 'group' },
},
],
} as Entity;
@@ -48,29 +48,14 @@ describe('<AboutContent />', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/o',
target: {
kind: 'user',
name: 'o',
namespace: 'default',
},
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/s',
target: {
kind: 'system',
name: 's',
namespace: 'default',
},
},
{
type: RELATION_PART_OF,
targetRef: 'domain:default/d',
target: {
kind: 'domain',
name: 'd',
namespace: 'default',
},
},
],
};
@@ -156,20 +141,10 @@ describe('<AboutContent />', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
target: {
kind: 'user',
name: 'guest',
namespace: 'default',
},
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/system',
target: {
kind: 'system',
name: 'system',
namespace: 'default',
},
},
],
};
@@ -263,29 +238,14 @@ describe('<AboutContent />', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
target: {
kind: 'user',
name: 'guest',
namespace: 'default',
},
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/system',
target: {
kind: 'system',
name: 'system',
namespace: 'default',
},
},
{
type: RELATION_PART_OF,
targetRef: 'component:default/parent-software',
target: {
kind: 'component',
name: 'parent-software',
namespace: 'default',
},
},
],
};
@@ -378,11 +338,6 @@ describe('<AboutContent />', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
target: {
kind: 'user',
name: 'guest',
namespace: 'default',
},
},
],
};
@@ -538,20 +493,10 @@ describe('<AboutContent />', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
target: {
kind: 'user',
name: 'guest',
namespace: 'default',
},
},
{
type: RELATION_PART_OF,
targetRef: 'system:default/system',
target: {
kind: 'system',
name: 'system',
namespace: 'default',
},
},
],
};
@@ -637,20 +582,10 @@ describe('<AboutContent />', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'user:default/guest',
target: {
kind: 'user',
name: 'guest',
namespace: 'default',
},
},
{
type: RELATION_PART_OF,
targetRef: 'domain:default/domain',
target: {
kind: 'domain',
name: 'domain',
namespace: 'default',
},
},
],
};
@@ -75,7 +75,6 @@ describe('DefaultCatalogPage', () => {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/tools',
target: { kind: 'group', name: 'tools', namespace: 'default' },
},
],
},
@@ -80,11 +80,6 @@ describe('<DependencyOfComponentsCard />', () => {
},
relations: [
{
target: {
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_DEPENDENCY_OF,
},
@@ -80,11 +80,6 @@ describe('<DependsOnComponentsCard />', () => {
},
relations: [
{
target: {
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_DEPENDS_ON,
},
@@ -80,11 +80,6 @@ describe('<DependsOnResourcesCard />', () => {
},
relations: [
{
target: {
kind: 'resource',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'resource:my-namespace/target-name',
type: RELATION_DEPENDS_ON,
},
@@ -80,11 +80,6 @@ describe('<HasComponentsCard />', () => {
},
relations: [
{
target: {
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_HAS_PART,
},
@@ -75,11 +75,6 @@ describe('<HasResourcesCard />', () => {
},
relations: [
{
target: {
kind: 'resource',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'resource:my-namespace/target-name',
type: RELATION_HAS_PART,
},
@@ -80,11 +80,6 @@ describe('<HasSubcomponentsCard />', () => {
},
relations: [
{
target: {
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_HAS_PART,
},
@@ -78,11 +78,6 @@ describe('<HasSystemsCard />', () => {
},
relations: [
{
target: {
kind: 'system',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'system:my-namespace/target-name',
type: RELATION_HAS_PART,
},
@@ -102,11 +102,6 @@ describe('<SystemDiagramCard />', () => {
},
relations: [
{
target: {
kind: 'domain',
namespace: 'namespace',
name: 'domain',
},
targetRef: 'domain:namespace/domain',
type: RELATION_PART_OF,
},
@@ -162,11 +157,6 @@ describe('<SystemDiagramCard />', () => {
},
relations: [
{
target: {
kind: 'Domain',
namespace: 'namespace',
name: 'alongdomainthatshouldgettruncated',
},
targetRef: 'domain:namespace/alongdomainthatshouldgettruncated',
type: RELATION_PART_OF,
},
-1
View File
@@ -43,7 +43,6 @@ const entity = (name?: string) =>
{
type: RELATION_OWNED_BY,
targetRef: `group:default/${name}`,
target: { kind: 'group', namespace: 'default', name },
},
],
} as Entity);
@@ -60,11 +60,6 @@ describe('MemberTab Test', () => {
{
type: 'memberOf',
targetRef: 'group:default/team-d',
target: {
kind: 'group',
name: 'team-d',
namespace: 'default',
},
},
],
spec: {
@@ -103,11 +103,6 @@ const items = [
{
type: 'ownedBy',
targetRef: 'group:default/my-team',
target: {
name: 'my-team',
namespace: 'default',
kind: 'group',
},
},
],
},
@@ -140,11 +135,6 @@ describe('OwnershipCard', () => {
{
type: 'memberOf',
targetRef: 'group:default/examplegroup',
target: {
kind: 'group',
name: 'examplegroup',
namespace: 'default',
},
},
],
};
@@ -266,11 +256,6 @@ describe('OwnershipCard', () => {
{
type: 'memberOf',
targetRef: 'group:default/my-team',
target: {
kind: 'group',
name: 'my-team',
namespace: 'default',
},
},
],
};
@@ -43,11 +43,6 @@ describe('UserSummary Test', () => {
{
type: 'memberOf',
targetRef: 'group:default/examplegroup',
target: {
kind: 'group',
name: 'ExampleGroup',
namespace: 'default',
},
},
],
};
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/my-team',
target: { name: 'team-a', kind: 'group', namespace: 'default' },
},
],
},
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/team-a',
target: { name: 'team-a', kind: 'group', namespace: 'default' },
},
],
},
@@ -58,7 +58,6 @@ const defaultEntityListResponse: GetEntitiesResponse = {
{
type: RELATION_OWNED_BY,
targetRef: 'group:default/team-a',
target: { name: 'team-a', kind: 'group', namespace: 'default' },
},
],
},
@@ -61,11 +61,6 @@ describe('DocsTable test', () => {
},
relations: [
{
target: {
kind: 'user',
namespace: 'default',
name: 'owned',
},
targetRef: 'user:default/owned',
type: 'ownedBy',
},
@@ -82,11 +77,6 @@ describe('DocsTable test', () => {
},
relations: [
{
target: {
kind: 'user',
namespace: 'default',
name: 'not-owned',
},
targetRef: 'user:default/not-owned',
type: 'ownedBy',
},
@@ -134,11 +124,6 @@ describe('DocsTable test', () => {
},
relations: [
{
target: {
kind: 'user',
namespace: 'default',
name: 'owned',
},
targetRef: 'user:default/owned',
type: 'ownedBy',
},