allow import from HTTP repositories

Signed-off-by: Wédney Yuri Lima <wedneyyuri@gmail.com>
This commit is contained in:
Wédney Yuri Lima
2021-04-20 19:45:18 -03:00
parent 00cd559c4a
commit 29a7e4be85
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