Skip to content

Commit

Permalink
fix(api): removed host size from unassigned sizes
Browse files Browse the repository at this point in the history
Some users may have encountered wrong size readings, when no mounts were present on the partitions -
this may have been caused by douplicating host sizes into the unassigned pool.

fixes #514
  • Loading branch information
MauriceNino committed Jan 6, 2023
1 parent 0a97265 commit e462e28
Show file tree
Hide file tree
Showing 4 changed files with 355 additions and 7 deletions.
14 changes: 10 additions & 4 deletions apps/api/__TESTS__/dynamic-info.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
TEST_CASE_11,
TEST_CASE_12,
TEST_CASE_13,
TEST_CASE_14,
TEST_CASE_2,
TEST_CASE_3,
TEST_CASE_4,
Expand All @@ -21,11 +22,10 @@ import {
const toStorageInp = (inp: TestCase) =>
[inp.layout, inp.blocks, inp.sizes] as const;

beforeEach(() => {
CONFIG.running_in_docker = true;
});

describe('Dynamic Info', () => {
beforeEach(() => {
CONFIG.running_in_docker = true;
});
describe('Storage', () => {
it('Test Case 1', () => {
const output = new DynamicStorageMapper(
Expand Down Expand Up @@ -106,5 +106,11 @@ describe('Dynamic Info', () => {
).getMappedLayout();
expect(output).to.deep.equal(TEST_CASE_13.output);
});
it('Test Case 14', () => {
const output = new DynamicStorageMapper(
...toStorageInp(TEST_CASE_14)
).getMappedLayout();
expect(output).to.deep.equal(TEST_CASE_14.output);
});
});
});
5 changes: 5 additions & 0 deletions apps/api/__TESTS__/static-info.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
TEST_CASE_11,
TEST_CASE_12,
TEST_CASE_13,
TEST_CASE_14,
TEST_CASE_2,
TEST_CASE_3,
TEST_CASE_4,
Expand Down Expand Up @@ -80,5 +81,9 @@ describe('Static Info', () => {
const output = mapToStorageLayout(...toStorageInp(TEST_CASE_13));
expect(output).to.deep.equal(TEST_CASE_13.layout);
});
it('Test Case 14', () => {
const output = mapToStorageLayout(...toStorageInp(TEST_CASE_14));
expect(output).to.deep.equal(TEST_CASE_14.layout);
});
});
});
Loading

0 comments on commit e462e28

Please sign in to comment.