Skip to content

Commit 0ebc055

Browse files
committed
Comment cleanup
1 parent 9effdac commit 0ebc055

File tree

4 files changed

+1
-111
lines changed

4 files changed

+1
-111
lines changed

src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,6 @@ namespace Microsoft.DotNet.MsiInstallerTests
88
{
99
public class WorkloadTests : SdkTest, IDisposable
1010
{
11-
// Remote execution notes:
12-
// psexec / uses Admin share (C$)
13-
// ddrits / cloudtest
14-
// sysinternals: filemon / regmon
15-
// May need to run winrm quickconfig to use WMI
16-
// How to apply snapshot via C#: https://stackoverflow.com/questions/60173096/hyperv-wmi-apply-snapshot-in-c-sharp
17-
// Also see https://stackoverflow.com/questions/1735978/manipulate-hyper-v-from-net
18-
// Official documentation?: https://learn.microsoft.com/en-us/windows/win32/hyperv_v2/exporting-virtual-machines
19-
// How to rename a snapshot: https://stackoverflow.com/questions/7599217/setting-hyper-v-snapshots-name-programmatically
20-
// There is a 50 checkpoint max
21-
22-
23-
// Reminder: Enable "Remote Service Management" firewall rule so that PSExec will run more quickly. Make sure network is set to "Private" in Windows settings (or enable the firewall rule for public networks).
2411

2512
string SdkInstallerVersion
2613
{

src/Tests/dotnet-MsiInstallation.Tests/RemoteFile.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Microsoft.DotNet.MsiInstallerTests
1313
{
14-
// TODO: Add VMAction for reading remote file, to allow read of file to be cached, avoiding the need to apply a snapshot to read the file on subsequent runs
15-
1614
abstract class RemoteFile
1715
{
1816
public RemoteFile(string path)

src/Tests/dotnet-MsiInstallation.Tests/VMAction.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,6 @@
1212

1313
namespace Microsoft.DotNet.MsiInstallerTests
1414
{
15-
// Core actions:
16-
// - Run command
17-
// - Copy file to VM
18-
// - Enumerate and read files / directories
19-
// - Is this actually an action?
20-
21-
// Run command
22-
// - Install .NET SDK (From SdkTesting folder)
23-
// - Uninstall .NET SDK
24-
// - Workload install / uninstall
25-
// - Apply rollback file
26-
// - Get .NET version - this shouldn't change state
27-
// Copy file to VM
28-
// - Deploy stage 2 SDK
29-
3015
abstract class VMAction
3116
{
3217
public VirtualMachine VM { get; }
@@ -316,7 +301,6 @@ public override int GetHashCode()
316301
public static bool operator !=(SerializedVMAction left, SerializedVMAction right) => !(left == right);
317302
}
318303

319-
// Do we need a separate VMActionResult, or should we just use CommandResult?
320304
class VMActionResult
321305
{
322306
public string Filename { get; set; }

src/Tests/dotnet-MsiInstallation.Tests/VMControl.cs

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ public async Task<string> CreateSnapshotAsync(string snapshotName)
159159

160160
var snapshotService = _session.EnumerateInstances(virtNamespace, "Msvm_VirtualSystemSnapshotService").First();
161161

162-
//var settingData = _session.CreateInstance(virtNamespace, new CimInstance("CIM_SettingData"));
163-
164162
CimMethodParametersCollection cimMethodParameters = new CimMethodParametersCollection {
165163
CimMethodParameter.Create("AffectedSystem", VMInstance, CimType.Reference, CimFlags.In),
166164
CimMethodParameter.Create("SnapshotType", 2, CimType.UInt16, CimFlags.In),
@@ -173,15 +171,6 @@ public async Task<string> CreateSnapshotAsync(string snapshotName)
173171

174172
await WaitForJobSuccess(result);
175173

176-
//var updatedSnapshots = GetSnapshots().ToDictionary(s => s.id, s => s.name);
177-
//foreach (var snapshot in updatedSnapshots)
178-
//{
179-
// if (!existingSnapshots.ContainsKey(snapshot.Key))
180-
// {
181-
// Log.WriteLine($"Created snapshot {snapshot.Value} ({snapshot.Key})");
182-
// }
183-
//}
184-
185174
var newSnapshot = GetSnapshots().Single(s => !existingSnapshots.ContainsKey(s.id));
186175

187176

@@ -250,12 +239,6 @@ VMEnabledState getCurrentState()
250239
return;
251240
}
252241

253-
//bool isAlreadyRunning = getCurrentState() == 2;
254-
//if (running == isAlreadyRunning)
255-
//{
256-
// return;
257-
//}
258-
259242
Log.WriteLine($"Changing EnabledState from {getCurrentState()} to {targetState}");
260243

261244
var methodParameters = new CimMethodParametersCollection()
@@ -359,71 +342,9 @@ enum VMEnabledState : UInt16
359342
ShuttingDown = 4,
360343
NotApplicable = 5,
361344
EnabledButOffline = 6,
362-
//NoContact = 7,
363-
//LostCommunication = 8,
364-
//DisabledNoRedundancy = 9,
365-
//InTest = 10,
366-
//Deferred = 11,
367-
//Quiesce = 12,
368-
//Starting = 13,
369-
//Snapshotting = 14,
370-
//Saving = 15,
371-
//Stopping = 16,
372-
//Pausing = 17,
373-
//Resuming = 18,
374-
//FastSnapshotting = 19,
375-
//FastSaving = 20,
376-
//StartingUp = 21,
377-
//PoweringDown = 22,
378-
//PoweringUp = 23,
379-
//SavingState = 24,
380-
//RestoringState = 25,
381-
//Paused = 26,
382-
//Resumed = 27,
383-
//Suspended = 28,
384-
//StartingUpService = 29,
385-
//UndoingSnapshot = 30,
386-
//ImportingSnapshot = 31,
387-
//ExportingSnapshot = 32,
388-
//MergingSnapshot = 33,
389-
//RemovingSnapshot = 34,
390-
//ApplyingSnapshot = 35,
391-
//Killing = 36,
392-
//StoppingService = 37,
393-
//SuspendedWithSavedState = 38,
394-
//StartingUpWithSavedState = 39,
395-
//InService = 40,
396-
//NoRecovery = 41,
397-
//Last = 42
345+
398346
}
399347

400-
//private class CimObserver<T> : IObserver<T>
401-
//{
402-
// TaskCompletionSource<T> _tcs;
403-
// Management.Infrastructure.Generic.CimAsyncResult<T> _result;
404-
405-
// public Task<T> Task => _tcs.Task;
406-
407-
// public CimObserver(Management.Infrastructure.Generic.CimAsyncResult<T> result)
408-
// {
409-
// _tcs = new TaskCompletionSource<T>();
410-
// _result = result;
411-
// _result.Subscribe(this);
412-
// }
413-
414-
// public void OnCompleted()
415-
// {
416-
// }
417-
// public void OnError(Exception error)
418-
// {
419-
// _tcs.SetException(error);
420-
// }
421-
// public void OnNext(T value)
422-
// {
423-
// _tcs.SetResult(value);
424-
// }
425-
//}
426-
427348
class RemoteCommand : TestCommand
428349
{
429350
string _targetMachineName;

0 commit comments

Comments
 (0)