feat: 일괄 릴리스 실행 계획을 추가한다
Gateway와 권한 있는 프로필 작업을 하나의 고정 커밋과 순서로 영속화한다. 앞 대상 성공 뒤 다음 작업을 claim하고 실패 대상은 같은 작업 ID로 재시도한다.
This commit is contained in:
@@ -1071,6 +1071,30 @@ describe('admin operation API', () => {
|
||||
);
|
||||
expect(capabilities).not.toContainEqual(expect.objectContaining({ permission: 'admin.profiles.manage' }));
|
||||
});
|
||||
|
||||
it('lists only bulk-update targets covered by the authenticated release capabilities', async () => {
|
||||
const profileOperator = await buildCaller(
|
||||
async () => {
|
||||
throw new Error('not used');
|
||||
},
|
||||
{ adminRoles: ['admin.profiles.deploy:che:2'], firstUserIsAdmin: false }
|
||||
);
|
||||
await expect(profileOperator.caller.admin.bulkReleases.targets()).resolves.toMatchObject({
|
||||
gateway: false,
|
||||
profiles: [{ profileName: 'che:2' }],
|
||||
});
|
||||
|
||||
const gatewayOperator = await buildCaller(
|
||||
async () => {
|
||||
throw new Error('not used');
|
||||
},
|
||||
{ adminRoles: ['admin.releases.manage'], firstUserIsAdmin: false }
|
||||
);
|
||||
await expect(gatewayOperator.caller.admin.bulkReleases.targets()).resolves.toEqual({
|
||||
gateway: true,
|
||||
profiles: [],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('profile operation progress API', () => {
|
||||
|
||||
Reference in New Issue
Block a user