This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix upgrade not showing when an RC is deployed (#513)
* Fix upgrade not showing when an RC is deployed * Fix lint * Lint fix * Move test file * Update helm-release-helper.service.spec.ts * Update helm-release-helper.service.ts
- Loading branch information
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...ages/kubernetes/src/kubernetes/workloads/release/tabs/helm-release-helper.service.spec.ts
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Version } from './helm-release-helper.service'; | ||
|
||
describe('HelmReleaseHelperService', () => { | ||
|
||
describe('Version', () => { | ||
|
||
const v10 = new Version('1.0.0'); | ||
const v11 = new Version('1.1.0'); | ||
const v11rc1 = new Version('1.0.0-rc.1'); | ||
const v11rc2 = new Version('1.0.0-rc.2'); | ||
const v201 = new Version('2.0.1'); | ||
const v101 = new Version('1.0.1'); | ||
|
||
it('version comparisons', () => { | ||
expect(v11.isNewer(v10)).toBe(true); | ||
expect(v11rc1.isNewer(v11)).toBe(false); | ||
expect(v11rc2.isNewer(v11rc1)).toBe(true); | ||
expect(v201.isNewer(v11)).toBe(true); | ||
expect(v201.isNewer(v11rc1)).toBe(true); | ||
expect(v10.isNewer(v11)).toBe(false); | ||
expect(v101.isNewer(v11)).toBe(false); | ||
expect(v101.isNewer(v10)).toBe(true); | ||
|
||
expect(v11rc1.isNewer(v10)).toBe(false); | ||
|
||
}); | ||
}); | ||
}); |
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