Skip to content

Commit

Permalink
feat: support new nightlies tag (#1223)
Browse files Browse the repository at this point in the history
Signed-off-by: axel7083 <[email protected]>
  • Loading branch information
axel7083 authored Jun 17, 2024
1 parent e19aec7 commit c0845ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
16 changes: 14 additions & 2 deletions packages/backend/src/studio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,24 @@ describe('version checker', () => {
expect(mocks.logErrorMock).not.toHaveBeenCalled();
});

test('check activate nighties value', async () => {
/**
* This check ensure we do not support old nighties version to be used
* update introduced in https://github.com/containers/podman-desktop/pull/7643
*/
test('check activate old nighties value', async () => {
(version as string) = 'v0.0.202404030805-3cb4544';
await expect(studio.activate()).rejects.toThrowError(
'Extension is not compatible with Podman Desktop version below 1.0.0. Current v0.0.202404030805-3cb4544',
);

expect(mocks.logErrorMock).toHaveBeenCalled();
});

test('check activate version nighties', async () => {
(version as string) = `1.0.0-${Date.now()}-b35e7bef`;
await studio.activate();

expect(mocks.logErrorMock).not.toHaveBeenCalled();
expect(mocks.consoleWarnMock).toHaveBeenCalledWith('nightlies version are not subject to version verification.');
});
});

Expand Down
5 changes: 0 additions & 5 deletions packages/backend/src/studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ export class Studio {
const current = coerce(version);
if (!current) return false;

if (current.major === 0 && current.minor === 0) {
console.warn('nightlies version are not subject to version verification.');
return true;
}

return satisfies(current, engines['podman-desktop']);
}

Expand Down

0 comments on commit c0845ef

Please sign in to comment.