-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not skip SSH urls from resolving devfile (#1252)
Revert the condition that does not allow to resolve devfile for SSH factory urls.
- Loading branch information
Showing
2 changed files
with
16 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,21 +114,6 @@ describe('Creating steps, fetching a devfile', () => { | |
jest.useRealTimers(); | ||
}); | ||
|
||
test('factory should not resolve the SSH location', async () => { | ||
const searchParams = new URLSearchParams({ | ||
[FACTORY_URL_ATTR]: '[email protected]:eclipse-che/che-dashboard.git', | ||
}); | ||
|
||
renderComponent(store, searchParams); | ||
|
||
await jest.advanceTimersByTimeAsync(MIN_STEP_DURATION_MS); | ||
|
||
await waitFor(() => expect(mockOnNextStep).toHaveBeenCalled()); | ||
expect(mockOnError).not.toHaveBeenCalled(); | ||
expect(mockOnRestart).not.toHaveBeenCalled(); | ||
expect(mockRequestFactoryResolver).not.toHaveBeenCalled(); | ||
}); | ||
|
||
test('devfile is already resolved', async () => { | ||
renderComponent(store, searchParams); | ||
|
||
|
@@ -734,9 +719,21 @@ describe('Creating steps, fetching a devfile', () => { | |
}); | ||
|
||
it('should go to next step', async () => { | ||
const emptyStore = new FakeStoreBuilder().build(); | ||
|
||
renderComponent(emptyStore, searchParams, location); | ||
const nextStore = new FakeStoreBuilder() | ||
.withFactoryResolver({ | ||
resolver: { | ||
location: factoryUrl, | ||
devfile: { | ||
schemaVersion: '2.3.0', | ||
metadata: { | ||
name: 'my-project', | ||
namespace: 'user-che', | ||
}, | ||
}, | ||
}, | ||
}) | ||
.build(); | ||
renderComponent(nextStore, searchParams, location); | ||
|
||
await jest.advanceTimersByTimeAsync(MIN_STEP_DURATION_MS); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters