Browse Source

SONAR-13987 Display validation for Bitbucket server

tags/8.6.0.39681
Jeremy Davis 3 years ago
parent
commit
fb72d6981f

+ 3
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx View File

@@ -32,7 +32,7 @@ import { AlmIntegration } from '../AlmIntegration';
jest.mock('../../../../../api/alm-settings', () => ({
countBindedProjects: jest.fn().mockResolvedValue(0),
deleteConfiguration: jest.fn().mockResolvedValue(undefined),
getAlmDefinitions: jest.fn().mockResolvedValue({ github: [], gitlab: [] }),
getAlmDefinitions: jest.fn().mockResolvedValue({ bitbucket: [], github: [], gitlab: [] }),
validateAlmSettings: jest.fn().mockResolvedValue('')
}));

@@ -56,6 +56,8 @@ it('should validate existing configurations', async () => {

await waitAndUpdate(wrapper);

expect(validateAlmSettings).toBeCalledTimes(4);
expect(validateAlmSettings).toBeCalledWith('b1');
expect(validateAlmSettings).toBeCalledWith('gh1');
expect(validateAlmSettings).toBeCalledWith('gh2');
expect(validateAlmSettings).toBeCalledWith('gl1');

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/utils.ts View File

@@ -19,4 +19,4 @@
*/
import { AlmKeys } from '../../../../types/alm-settings';

export const VALIDATED_ALMS = [AlmKeys.GitHub, AlmKeys.GitLab];
export const VALIDATED_ALMS = [AlmKeys.Bitbucket, AlmKeys.GitHub, AlmKeys.GitLab];

Loading…
Cancel
Save