Skip to content

Commit 877acc1

Browse files
authored
feat(x2a): adding GET /projects/:projectId/modules endpoint (#2258)
Signed-off-by: Marek Libra <marek.libra@gmail.com>
1 parent ee1d2ce commit 877acc1

29 files changed

Lines changed: 1407 additions & 321 deletions
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-x2a-backend': patch
3+
'@red-hat-developer-hub/backstage-plugin-x2a-common': patch
4+
---
5+
6+
added GET '/projects/:projectId/modules' endpoint

workspaces/x2a/plugins/x2a-backend/migrations/2025012401_create_jobs_table.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export async function up(knex: Knex): Promise<void> {
6565

6666
await knex.schema.createTable('artifacts', table => {
6767
table.uuid('id').primary();
68+
table.string('type').notNullable(); // The artifact type
6869
table.string('value').notNullable(); // The artifact string value
6970
table
7071
.uuid('job_id')

workspaces/x2a/plugins/x2a-backend/src/plugin.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jest.mock('@backstage/backend-plugin-api', () => ({
9191
})),
9292
}));
9393

94-
const getX2aDatabaseServiceMock = () => ({
94+
const getX2aDatabaseServiceMock = (): typeof x2aDatabaseServiceRef.T => ({
9595
// projects
9696
createProject: jest
9797
.fn()
@@ -116,6 +116,8 @@ const getX2aDatabaseServiceMock = () => ({
116116
listJobs: jest.fn().mockRejectedValue(new NotAllowedError('mock error')),
117117
getJob: jest.fn().mockRejectedValue(new NotAllowedError('mock error')),
118118
updateJob: jest.fn().mockRejectedValue(new NotAllowedError('mock error')),
119+
getJobWithLog: jest.fn().mockRejectedValue(new NotAllowedError('mock error')),
120+
getJobLogs: jest.fn().mockRejectedValue(new NotAllowedError('mock error')),
119121
});
120122

121123
const getKubeServiceMock = () =>

0 commit comments

Comments
 (0)