658960e3f9
Make PowerShell Core reads group policy settings from different registry keys (Windows only) and the configuration files (both Windows and Unix). - On Windows, move to different GPO registry keys. - On both Windows and Unix, read GPO related settings from the configuration file `powershell.config.json`. - On Windows, the policy settings in registry take precedence over the configuration file. - Enable policy controlled logging and transcription on Unix.
30 lines
958 B
C#
30 lines
958 B
C#
using Xunit;
|
|
using System;
|
|
using System.Management.Automation;
|
|
|
|
namespace PSTests.Parallel
|
|
{
|
|
// Not static because a test requires non-const variables
|
|
public class MshSnapinInfoTests
|
|
{
|
|
// Test that it does not throw an exception
|
|
[SkippableFact]
|
|
public void TestReadRegistryInfo()
|
|
{
|
|
Skip.IfNot(Platform.IsWindows);
|
|
Version someVersion = null;
|
|
string someString = null;
|
|
PSSnapInReader.ReadRegistryInfo(out someVersion, out someString, out someString, out someString, out someString, out someVersion);
|
|
}
|
|
|
|
// PublicKeyToken is null on Linux
|
|
[SkippableFact]
|
|
public void TestReadCoreEngineSnapIn()
|
|
{
|
|
Skip.IfNot(Platform.IsWindows);
|
|
PSSnapInInfo pSSnapInInfo = PSSnapInReader.ReadCoreEngineSnapIn();
|
|
Assert.Contains("PublicKeyToken=31bf3856ad364e35", pSSnapInInfo.AssemblyName);
|
|
}
|
|
}
|
|
}
|