Skip to content

Commit 7c7c3b2

Browse files
add tests
1 parent 6a07562 commit 7c7c3b2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/utils/disks/__test__/calculateVDiskSeverity.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,20 @@ describe('VDisk state', () => {
111111
expect(severity).not.toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Blue);
112112
});
113113

114+
test('Should not display VDisk as replicating if DiskSpace or FrontQueues are blue', () => {
115+
const severity1 = calculateVDiskSeverity({
116+
VDiskState: EVDiskState.OK,
117+
FrontQueues: EFlag.Blue,
118+
});
119+
const severity2 = calculateVDiskSeverity({
120+
VDiskState: EVDiskState.OK,
121+
DiskSpace: EFlag.Blue,
122+
});
123+
124+
expect(severity1).not.toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Blue);
125+
expect(severity2).not.toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Blue);
126+
});
127+
114128
test('Should display replicating VDisks in a not-OK state with a regular color', () => {
115129
const severity1 = calculateVDiskSeverity({
116130
VDiskState: EVDiskState.Initial, // severity 3, yellow

0 commit comments

Comments
 (0)