chore: add hostname test update dev entity annotations

Signed-off-by: Adam Letizia <LetiziaAdam@JohnDeere.com>
This commit is contained in:
Adam Letizia
2023-05-11 16:01:55 -05:00
parent 96e1004e2a
commit 7515edff7e
2 changed files with 10 additions and 2 deletions
@@ -48,6 +48,8 @@ describe('<RecentWorkflowRunsCard />', () => {
name: 'software',
annotations: {
'github.com/project-slug': 'theorg/the-service',
'backstage.io/source-location':
'url:https://ghes.acme.co/theorg/the-service/tree/main/',
},
},
spec: {
@@ -119,10 +121,14 @@ describe('<RecentWorkflowRunsCard />', () => {
);
});
it('uses the github repo and owner from the entity annotation', async () => {
it('uses the github hostname, repo and owner from the entity annotations', async () => {
renderSubject();
expect(useWorkflowRuns).toHaveBeenCalledWith(
expect.objectContaining({ owner: 'theorg', repo: 'the-service' }),
expect.objectContaining({
hostname: 'ghes.acme.co',
owner: 'theorg',
repo: 'the-service',
}),
);
});