Skip to content

Commit 2c08069

Browse files
Fix unit tests
1 parent 46bc1ef commit 2c08069

File tree

2 files changed

+40
-6
lines changed

2 files changed

+40
-6
lines changed

src/core/test/Eryph.VMManagement.HyperV.Test/ConvergeDriveTests.cs

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Eryph.ConfigModel;
22
using Eryph.ConfigModel.Catlets;
3+
using Eryph.Core;
34
using Eryph.Core.Genetics;
45
using Eryph.Resources.Disks;
56
using Eryph.VmManagement.Converging;
@@ -27,7 +28,12 @@ public async Task Converges_existing_disk(int? configSize, int currentSize, int
2728
{
2829
_fixture.Config.Drives =
2930
[
30-
new CatletDriveConfig { Name = "sda" , Size = configSize }
31+
new CatletDriveConfig
32+
{
33+
Name = "sda",
34+
Store = EryphConstants.DefaultDataStoreName,
35+
Size = configSize
36+
}
3137
];
3238
_fixture.StorageSettings = _fixture.StorageSettings with
3339
{
@@ -116,7 +122,12 @@ public async Task Skips_existing_disk_with_checkpoint()
116122
{
117123
_fixture.Config.Drives =
118124
[
119-
new CatletDriveConfig { Name = "sda" , Size = 150 }
125+
new CatletDriveConfig
126+
{
127+
Name = "sda",
128+
Store = EryphConstants.DefaultDataStoreName,
129+
Size = 150
130+
}
120131
];
121132
_fixture.StorageSettings = _fixture.StorageSettings with
122133
{
@@ -209,7 +220,12 @@ public async Task Converges_new_disk(
209220
{
210221
_fixture.Config.Drives =
211222
[
212-
new CatletDriveConfig { Name = "sdb", Type = driveType }
223+
new CatletDriveConfig
224+
{
225+
Type = driveType,
226+
Name = "sdb",
227+
Store = EryphConstants.DefaultDataStoreName,
228+
}
213229
];
214230
_fixture.StorageSettings = _fixture.StorageSettings with
215231
{
@@ -327,7 +343,12 @@ public async Task Converges_new_disk_with_genepool_parent(
327343
{
328344
_fixture.Config.Drives =
329345
[
330-
new CatletDriveConfig { Name = "sda", Source = "gene:testorg/testset/testtag:sda" }
346+
new CatletDriveConfig
347+
{
348+
Name = "sda",
349+
Store = EryphConstants.DefaultDataStoreName,
350+
Source = "gene:testorg/testset/testtag:sda"
351+
}
331352
];
332353
_fixture.ResolvedGenes =
333354
[
@@ -466,8 +487,10 @@ public async Task Converges_new_set_or_shared_disk_with_genepool_parent(
466487
[
467488
new CatletDriveConfig
468489
{
469-
Name = "sda", Source = "gene:testorg/testset/testtag:sda",
470-
Type =driveType
490+
Type = driveType,
491+
Name = "sda",
492+
Source = "gene:testorg/testset/testtag:sda",
493+
Store = EryphConstants.DefaultDataStoreName,
471494
}
472495
];
473496

src/core/test/Eryph.VMManagement.HyperV.Test/Storage/VMDriveStorageSettingsTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Threading.Tasks;
66
using Eryph.ConfigModel;
77
using Eryph.ConfigModel.Catlets;
8+
using Eryph.Core;
89
using Eryph.Core.Genetics;
910
using Eryph.Core.VmAgent;
1011
using Eryph.VmManagement.Data.Core;
@@ -55,6 +56,7 @@ public async Task PlanDriveStorageSettings_MultipleDrives_DrivesHaveCorrectContr
5556
new CatletDriveConfig
5657
{
5758
Type = CatletDriveType.Vhd,
59+
Store = EryphConstants.DefaultDataStoreName,
5860
Name = "sda",
5961
},
6062
new CatletDriveConfig
@@ -65,6 +67,7 @@ public async Task PlanDriveStorageSettings_MultipleDrives_DrivesHaveCorrectContr
6567
new CatletDriveConfig
6668
{
6769
Type = CatletDriveType.Vhd,
70+
Store = EryphConstants.DefaultDataStoreName,
6871
Name = "sdb",
6972
},
7073
new CatletDriveConfig
@@ -132,6 +135,7 @@ public async Task PlanDriveStorageSettings_UsesCorrectExtensionForVhdType(
132135
{
133136
Type = driveType,
134137
Name = "sda",
138+
Store = EryphConstants.DefaultDataStoreName,
135139
}
136140
],
137141
};
@@ -174,6 +178,7 @@ public async Task PlanDriveStorageSettings_NewDiskWithoutConfiguredSizeAndWithPa
174178
{
175179
Type = CatletDriveType.Vhd,
176180
Name = "sda",
181+
Store = EryphConstants.DefaultDataStoreName,
177182
Source = "gene:testorg/testset/testtag:sda",
178183
}
179184
],
@@ -229,6 +234,7 @@ public async Task PlanDriveStorageSettings_NewDiskWithoutConfiguredSizeAndWithou
229234
{
230235
Type = CatletDriveType.Vhd,
231236
Name = "sda",
237+
Store = EryphConstants.DefaultDataStoreName,
232238
}
233239
],
234240
};
@@ -269,6 +275,7 @@ public async Task PlanDriveStorageSettings_NewDiskWithConfiguredSizeAndWithoutPa
269275
{
270276
Type = CatletDriveType.Vhd,
271277
Name = "sda",
278+
Store = EryphConstants.DefaultDataStoreName,
272279
Size = 42,
273280
}
274281
],
@@ -315,6 +322,7 @@ public async Task PlanDriveStorageSettings_NewDiskWithConfiguredSizeAndWithSmall
315322
{
316323
Type = CatletDriveType.Vhd,
317324
Name = "sda",
325+
Store = EryphConstants.DefaultDataStoreName,
318326
Source = "gene:testorg/testset/testtag:sda",
319327
Size = 42,
320328
}
@@ -371,6 +379,7 @@ public async Task PlanDriveStorageSettings_NewDiskWithConfiguredSizeAndWithLarge
371379
{
372380
Type = CatletDriveType.Vhd,
373381
Name = "sda",
382+
Store = EryphConstants.DefaultDataStoreName,
374383
Source = "gene:testorg/testset/testtag:sda",
375384
Size = 42,
376385
}
@@ -415,6 +424,7 @@ public async Task PlanDriveStorageSettings_ExistingDiskWithConfiguredSizeTooSmal
415424
new CatletDriveConfig
416425
{
417426
Type = CatletDriveType.Vhd,
427+
Store = EryphConstants.DefaultDataStoreName,
418428
Name = "sda",
419429
Size = 42,
420430
}
@@ -449,6 +459,7 @@ public async Task PlanDriveStorageSettings_ExistingDiskWithConfiguredSizeLarger_
449459
{
450460
Type = CatletDriveType.Vhd,
451461
Name = "sda",
462+
Store = EryphConstants.DefaultDataStoreName,
452463
Size = 42,
453464
}
454465
],

0 commit comments

Comments
 (0)