Merge pull request #9972 from backstage/jhaals/remove-target-relation

catalog-model: Remove `target` from `EntityRelation` type
This commit is contained in:
Fredrik Adelöw
2022-03-10 16:58:08 +01:00
committed by GitHub
42 changed files with 13 additions and 421 deletions
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/catalog-model': minor
'@backstage/plugin-catalog-backend': minor
---
**BREAKING**: Removed the `target` property from `EntityRelation`. This field has been replaced by `targetRef`.
This means that `target: { name: 'team-a', kind: 'group', namespace: 'default' }` is now replaced with `targetRef: 'group:default/team-a'` in entity relations.
The entities API endpoint still return the old `target` field for to ease transitions, however the future removal of this field will be considered non breaking.
@@ -108,27 +108,8 @@ import { EntityTodoContent } from '@backstage/plugin-todo';
import { Button, Grid } from '@material-ui/core';
import BadgeIcon from '@material-ui/icons/CallToAction';
import {
EntityGithubInsightsContent,
EntityGithubInsightsLanguagesCard,
EntityGithubInsightsReadmeCard,
EntityGithubInsightsReleasesCard,
isGithubInsightsAvailable,
} from '@roadiehq/backstage-plugin-github-insights';
import {
EntityGithubPullRequestsContent,
EntityGithubPullRequestsOverviewCard,
isGithubPullRequestsAvailable,
} from '@roadiehq/backstage-plugin-github-pull-requests';
import {
EntityTravisCIContent,
EntityTravisCIOverviewCard,
isTravisciAvailable,
} from '@roadiehq/backstage-plugin-travis-ci';
import {
EntityBuildkiteContent,
isBuildkiteAvailable,
} from '@roadiehq/backstage-plugin-buildkite';
import { EntityGithubInsightsContent } from '@roadiehq/backstage-plugin-github-insights';
import { EntityGithubPullRequestsContent } from '@roadiehq/backstage-plugin-github-pull-requests';
import {
isNewRelicDashboardAvailable,
EntityNewRelicDashboardContent,
@@ -179,10 +160,6 @@ export const cicdContent = (
<EntityJenkinsContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isBuildkiteAvailable}>
<EntityBuildkiteContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isCircleCIAvailable}>
<EntityCircleCIContent />
</EntitySwitch.Case>
@@ -191,10 +168,6 @@ export const cicdContent = (
<EntityCloudbuildContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isTravisciAvailable}>
<EntityTravisCIContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isGoCdAvailable}>
<EntityGoCdContent />
</EntitySwitch.Case>
@@ -234,12 +207,6 @@ const cicdCard = (
</Grid>
</EntitySwitch.Case>
<EntitySwitch.Case if={isTravisciAvailable}>
<Grid item sm={6}>
<EntityTravisCIOverviewCard />
</Grid>
</EntitySwitch.Case>
<EntitySwitch.Case if={isGithubActionsAvailable}>
<Grid item sm={6}>
<EntityRecentGithubActionsRunsCard limit={4} variant="gridItem" />
@@ -325,18 +292,6 @@ const overviewContent = (
{cicdCard}
<EntitySwitch>
<EntitySwitch.Case if={e => Boolean(isGithubInsightsAvailable(e))}>
<Grid item md={6}>
<EntityGithubInsightsLanguagesCard />
<EntityGithubInsightsReleasesCard />
</Grid>
<Grid item md={6}>
<EntityGithubInsightsReadmeCard maxHeight={350} />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={isLighthouseAvailable}>
<Grid item sm={4}>
@@ -345,14 +300,6 @@ const overviewContent = (
</EntitySwitch.Case>
</EntitySwitch>
<EntitySwitch>
<EntitySwitch.Case if={e => Boolean(isGithubPullRequestsAvailable(e))}>
<Grid item sm={4}>
<EntityGithubPullRequestsOverviewCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
<Grid item md={8} xs={12}>
<EntityHasSubcomponentsCard variant="gridItem" />
</Grid>
-1
View File
@@ -192,7 +192,6 @@ export type EntityPolicy = {
// @public
export type EntityRelation = {
type: string;
target: CompoundEntityRef;
targetRef: string;
};
@@ -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',
},
},
],
};
@@ -208,9 +208,10 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog {
// 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
// TODO(jhaals): Remove this in April 2022
for (const entity of entities) {
if (entity.relations) {
for (const relation of entity.relations) {
for (const relation of entity.relations as any) {
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
@@ -94,11 +94,6 @@ describe('Stitcher', () => {
{
type: 'looksAt',
targetRef: 'k:ns/other',
target: {
kind: 'k',
namespace: 'ns',
name: 'other',
},
},
],
apiVersion: 'a',
@@ -160,20 +155,10 @@ describe('Stitcher', () => {
{
type: 'looksAt',
targetRef: 'k:ns/other',
target: {
kind: 'k',
namespace: 'ns',
name: 'other',
},
},
{
type: 'looksAt',
targetRef: 'k:ns/third',
target: {
kind: 'k',
namespace: 'ns',
name: 'third',
},
},
]),
apiVersion: 'a',
@@ -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',
},