Merge pull request #5399 from wedneyyuri/backstage-import-from-http

allow import from HTTP repositories
This commit is contained in:
Fredrik Adelöw
2021-04-21 07:18:26 +02:00
committed by GitHub
3 changed files with 10 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-import': patch
---
allow import from HTTP repositories
@@ -127,7 +127,9 @@ describe('<StepInitAnalyzeUrl />', () => {
expect(catalogImportApi.analyzeUrl).toBeCalledTimes(0);
expect(onAnalysisFn).toBeCalledTimes(0);
expect(errorApi.post).toBeCalledTimes(0);
expect(getByText('Must start with https://.')).toBeInTheDocument();
expect(
getByText('Must start with http:// or https://.'),
).toBeInTheDocument();
});
it('should analyze single location', async () => {
@@ -132,8 +132,8 @@ export const StepInitAnalyzeUrl = ({
validate: {
httpsValidator: (value: any) =>
(typeof value === 'string' &&
value.match(/^https:\/\//) !== null) ||
'Must start with https://.',
value.match(/^http[s]?:\/\//) !== null) ||
'Must start with http:// or https://.',
},
})}
required