diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f595c31..e5636e2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,8 +61,7 @@ jobs: $ErrorActionPreference = "Stop" $ResultsPath = "${{ matrix.results_file }}" $TestPath = @( - (Resolve-Path .\src\Puppet.Dsc\functions) - (Resolve-Path .\src\Puppet.Dsc\internal\functions) + (Resolve-Path .\src\Puppet.Dsc\tests\Unit) (Resolve-Path .\src\Puppet.Dsc\tests\general) ) $Results = .\scripts\invoke_tests.ps1 -TestPath $TestPath -ResultsPath $ResultsPath -Tag ${{ matrix.tag }} diff --git a/Puppet.Dsc b/Puppet.Dsc new file mode 100644 index 00000000..5b952aab --- /dev/null +++ b/Puppet.Dsc @@ -0,0 +1,939 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected regular expression '(>=|<)' to not match '{ + "VersionRequirement": ">= 6.0.0 < 7.0.0" +}', but it did match. + at $ExampleObject | ConvertTo-Json | Should -Not -Match '(>=|<)', /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/ConvertTo-UnescapedJson.Tests.ps1:17 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/ConvertTo-UnescapedJson.Tests.ps1:17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This test should run but it did not. Most likely a setup in some parent block failed. + + + + + + This test should run but it did not. Most likely a setup in some parent block failed. + + + + + + This test should run but it did not. Most likely a setup in some parent block failed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DllNotFoundException: Unable to load shared library 'libmi' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: +dlopen(/usr/local/microsoft/powershell/7/libmi.dylib, 0x0001): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib + Referenced from: <9D99A250-3417-351B-9EE8-3DAB1014444C> /usr/local/microsoft/powershell/7/libmi.dylib + Reason: tried: '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache) +dlopen(libmi.dylib, 0x0001): tried: 'libmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache), 'libmi.dylib' (no such file), '/usr/local/lib/libmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi.dylib, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file) +dlopen(liblibmi.dylib, 0x0001): tried: 'liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache), 'liblibmi.dylib' (no such file), '/usr/local/lib/liblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/libmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/libmi' (no such file), '/usr/local/microsoft/powershell/7/libmi' (no such file) +dlopen(libmi, 0x0001): tried: 'libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache), 'libmi' (no such file), '/usr/local/lib/libmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/usr/local/microsoft/powershell/7/liblibmi' (no such file) +dlopen(liblibmi, 0x0001): tried: 'liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache), 'liblibmi' (no such file), '/usr/local/lib/liblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache) +MethodInvocationException: Exception calling "LoadDefaultCimKeywords" with "2" argument(s): "Unable to load shared library 'libmi' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: +dlopen(/usr/local/microsoft/powershell/7/libmi.dylib, 0x0001): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib + Referenced from: <9D99A250-3417-351B-9EE8-3DAB1014444C> /usr/local/microsoft/powershell/7/libmi.dylib + Reason: tried: '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache) +dlopen(libmi.dylib, 0x0001): tried: 'libmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache), 'libmi.dylib' (no such file), '/usr/local/lib/libmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi.dylib, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file) +dlopen(liblibmi.dylib, 0x0001): tried: 'liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache), 'liblibmi.dylib' (no such file), '/usr/local/lib/liblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/libmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/libmi' (no such file), '/usr/local/microsoft/powershell/7/libmi' (no such file) +dlopen(libmi, 0x0001): tried: 'libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache), 'libmi' (no such file), '/usr/local/lib/libmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/usr/local/microsoft/powershell/7/liblibmi' (no such file) +dlopen(liblibmi, 0x0001): tried: 'liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache), 'liblibmi' (no such file), '/usr/local/lib/liblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache) +" + at Get-DscResource<Begin>, /Users/jordan.breen/.local/share/powershell/Modules/PSDesiredStateConfiguration/2.0.7/PSDesiredStateConfiguration.psm1:3922 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfo.Tests.ps1:15 + + + + + + + + + DllNotFoundException: Unable to load shared library 'libmi' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: +dlopen(/usr/local/microsoft/powershell/7/libmi.dylib, 0x0001): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib + Referenced from: <9D99A250-3417-351B-9EE8-3DAB1014444C> /usr/local/microsoft/powershell/7/libmi.dylib + Reason: tried: '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache) +dlopen(libmi.dylib, 0x0001): tried: 'libmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache), 'libmi.dylib' (no such file), '/usr/local/lib/libmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi.dylib, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file) +dlopen(liblibmi.dylib, 0x0001): tried: 'liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache), 'liblibmi.dylib' (no such file), '/usr/local/lib/liblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/libmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/libmi' (no such file), '/usr/local/microsoft/powershell/7/libmi' (no such file) +dlopen(libmi, 0x0001): tried: 'libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache), 'libmi' (no such file), '/usr/local/lib/libmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/usr/local/microsoft/powershell/7/liblibmi' (no such file) +dlopen(liblibmi, 0x0001): tried: 'liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache), 'liblibmi' (no such file), '/usr/local/lib/liblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache) +MethodInvocationException: Exception calling "LoadDefaultCimKeywords" with "2" argument(s): "Unable to load shared library 'libmi' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: +dlopen(/usr/local/microsoft/powershell/7/libmi.dylib, 0x0001): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib + Referenced from: <9D99A250-3417-351B-9EE8-3DAB1014444C> /usr/local/microsoft/powershell/7/libmi.dylib + Reason: tried: '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/opt/openssl/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file, not in dyld cache) +dlopen(libmi.dylib, 0x0001): tried: 'libmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache), 'libmi.dylib' (no such file), '/usr/local/lib/libmi.dylib' (no such file), '/usr/lib/libmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi.dylib, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file), '/usr/local/microsoft/powershell/7/liblibmi.dylib' (no such file) +dlopen(liblibmi.dylib, 0x0001): tried: 'liblibmi.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache), 'liblibmi.dylib' (no such file), '/usr/local/lib/liblibmi.dylib' (no such file), '/usr/lib/liblibmi.dylib' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/libmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/libmi' (no such file), '/usr/local/microsoft/powershell/7/libmi' (no such file) +dlopen(libmi, 0x0001): tried: 'libmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache), 'libmi' (no such file), '/usr/local/lib/libmi' (no such file), '/usr/lib/libmi' (no such file, not in dyld cache) +dlopen(/usr/local/microsoft/powershell/7/liblibmi, 0x0001): tried: '/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/microsoft/powershell/7/liblibmi' (no such file), '/usr/local/microsoft/powershell/7/liblibmi' (no such file) +dlopen(liblibmi, 0x0001): tried: 'liblibmi' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache), 'liblibmi' (no such file), '/usr/local/lib/liblibmi' (no such file), '/usr/lib/liblibmi' (no such file, not in dyld cache) +" + at Get-DscResource<Begin>, /Users/jordan.breen/.local/share/powershell/Modules/PSDesiredStateConfiguration/2.0.7/PSDesiredStateConfiguration.psm1:3922 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfo.Tests.ps1:39 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This test should run but it did not. Most likely a setup in some parent block failed. + + + + + + This test should run but it did not. Most likely a setup in some parent block failed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\Foo' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/Foo' because it does not exist.'. from line:45 char:13 + + $Path = Resolve-Path $Path -ErrorAction Stop + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at Should -Throw "Cannot find path 'TestDrive:\Foo' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Invoke-PdkCommand.Tests.ps1:29 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Invoke-PdkCommand.Tests.ps1:28 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\DoesNotExist\metadata.json'*' to be thrown, but the message was 'Cannot find path 'TestDrive:/DoesNotExist/metadata.json' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:62 char:13 + + { Set-PuppetModuleVersion -PuppetModuleFolderPath 'TestDriv … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at Should -Throw "Cannot find path 'TestDrive:\DoesNotExist\metadata.json'*", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:63 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:62 + + + + + + + + + Expected an exception with message like 'Unparseable!' to be thrown, but no exception was thrown. + at Should -Throw 'Unparseable!', /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:76 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:75 + + + + + + + + Expected Resolve-Path in module puppet.dsc to be called at least 1 times, but was called 0 times + at Should -Invoke Resolve-Path -Scope Context -ParameterFilter { $Path -eq 'TestDrive:\foo\metadata.json' }, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:38 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:38 + + + + + + Expected Out-Utf8File in module puppet.dsc to be called at least 1 times, but was called 0 times + at Should -Invoke Out-Utf8File -Scope Context -ParameterFilter {, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:48 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1:48 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected $true, but got $false. + at Test-SymLinkedItem -Path 'TestDrive:\foo\bar\baz' -Recurse | Should -BeTrue, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Test-SymLinkedItem.Tests.ps1:30 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Test-SymLinkedItem.Tests.ps1:30 + + + + + + + + + + + + + + + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\foo\bar\CHANGELOG.md' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/foo/bar/CHANGELOG.md' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1:40 char:13 + + { Update-PuppetModuleChangelog @Parameters } | Should -Thro … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at { Update-PuppetModuleChangelog @Parameters } | Should -Throw "Cannot find path 'TestDrive:\foo\bar\CHANGELOG.md' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1:40 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1:40 + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\foo\bar' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/foo/bar' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1:47 char:13 + + { Update-PuppetModuleChangelog @Parameters } | Should -Thro … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at { Update-PuppetModuleChangelog @Parameters } | Should -Throw "Cannot find path 'TestDrive:\foo\bar' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1:47 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1:47 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\foo\bar\.fixtures.yml' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/foo/bar/.fixtures.yml' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleFixture.Tests.ps1:24 char:11 + + { Update-PuppetModuleFixture -PuppetModuleFolderPath TestDriv … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at { Update-PuppetModuleFixture -PuppetModuleFolderPath TestDrive:\foo\bar } | Should -Throw "Cannot find path 'TestDrive:\foo\bar\.fixtures.yml' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleFixture.Tests.ps1:24 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleFixture.Tests.ps1:24 + + + + + + + + + + + + + + + + + + + + + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\foo\bar\metadata.json' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/foo/bar/metadata.json' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1:41 char:13 + + { Update-PuppetModuleMetadata -PuppetModuleFolderPath TestD … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at Should -Throw "Cannot find path 'TestDrive:\foo\bar\metadata.json' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1:42 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1:41 + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\foo\bar' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/foo/bar' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1:45 char:13 + + { Update-PuppetModuleMetadata -PuppetModuleFolderPath $Pupp … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at Should -Throw "Cannot find path 'TestDrive:\foo\bar' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1:46 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1:45 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\foo\bar\README.md' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/foo/bar/README.md' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1:43 char:13 + + { Update-PuppetModuleReadme @Parameters } | Should -Throw " … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at { Update-PuppetModuleReadme @Parameters } | Should -Throw "Cannot find path 'TestDrive:\foo\bar\README.md' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1:43 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1:43 + + + + + Expected an exception with message like 'Cannot find path 'TestDrive:\foo\bar' because it does not exist.' to be thrown, but the message was 'Cannot find path 'TestDrive:/foo/bar' because it does not exist.'. from /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1:52 char:13 + + { Update-PuppetModuleReadme @Parameters } | Should -Throw " … + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + at { Update-PuppetModuleReadme @Parameters } | Should -Throw "Cannot find path 'TestDrive:\foo\bar' because it does not exist.", /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1:52 +at <ScriptBlock>, /Users/jordan.breen/Desktop/repos/tools/Puppet.Dsc/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1:52 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Puppet.Dsc/internal/functions/Add-DscResourceModule.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Add-DscResourceModule.Tests.ps1 similarity index 97% rename from src/Puppet.Dsc/internal/functions/Add-DscResourceModule.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Add-DscResourceModule.Tests.ps1 index c714e5f2..06db2491 100644 --- a/src/Puppet.Dsc/internal/functions/Add-DscResourceModule.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Add-DscResourceModule.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Add-DscResourceModule' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') Mock New-Item -Verifiable Mock Save-Module -Verifiable diff --git a/src/Puppet.Dsc/internal/functions/Add-PuppetReferenceDocumentation.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Add-PuppetReferenceDocumentation.Tests.ps1 similarity index 93% rename from src/Puppet.Dsc/internal/functions/Add-PuppetReferenceDocumentation.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Add-PuppetReferenceDocumentation.Tests.ps1 index 80f62cdf..422f866b 100644 --- a/src/Puppet.Dsc/internal/functions/Add-PuppetReferenceDocumentation.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Add-PuppetReferenceDocumentation.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Add-PuppetReferenceDocumentation' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/internal/functions/ConvertFrom-VersionBuild.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/ConvertFrom-VersionBuild.Tests.ps1 similarity index 85% rename from src/Puppet.Dsc/internal/functions/ConvertFrom-VersionBuild.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/ConvertFrom-VersionBuild.Tests.ps1 index e2eb3b96..7768bea8 100644 --- a/src/Puppet.Dsc/internal/functions/ConvertFrom-VersionBuild.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/ConvertFrom-VersionBuild.Tests.ps1 @@ -1,6 +1,6 @@ Describe 'ConvertFrom-VersionBuild' -Tag 'Unit' { BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/ConvertTo-CanonicalPuppetAuthorName.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/ConvertTo-CanonicalPuppetAuthorName.Tests.ps1 similarity index 89% rename from src/Puppet.Dsc/internal/functions/ConvertTo-CanonicalPuppetAuthorName.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/ConvertTo-CanonicalPuppetAuthorName.Tests.ps1 index d436d61f..476ca0e5 100644 --- a/src/Puppet.Dsc/internal/functions/ConvertTo-CanonicalPuppetAuthorName.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/ConvertTo-CanonicalPuppetAuthorName.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'ConvertTo-CanonicalPuppetAuthorName' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { It 'lower-cases author name' { diff --git a/src/Puppet.Dsc/functions/ConvertTo-PuppetResourceApi.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/ConvertTo-PuppetResourceApi.Tests.ps1 similarity index 90% rename from src/Puppet.Dsc/functions/ConvertTo-PuppetResourceApi.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/ConvertTo-PuppetResourceApi.Tests.ps1 index ab20a39d..218a70dd 100644 --- a/src/Puppet.Dsc/functions/ConvertTo-PuppetResourceApi.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/ConvertTo-PuppetResourceApi.Tests.ps1 @@ -3,7 +3,7 @@ Describe 'ConvertTo-CanonicalPuppetAuthorName' -Tag 'Unit' { $ModuleRootPath = Split-Path -Parent $PSCommandPath | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/ConvertTo-PuppetRubyString.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/ConvertTo-PuppetRubyString.Tests.ps1 similarity index 92% rename from src/Puppet.Dsc/internal/functions/ConvertTo-PuppetRubyString.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/ConvertTo-PuppetRubyString.Tests.ps1 index afb9289f..fa8dbefb 100644 --- a/src/Puppet.Dsc/internal/functions/ConvertTo-PuppetRubyString.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/ConvertTo-PuppetRubyString.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'ConvertTo-CanonicalPuppetAuthorName' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/ConvertTo-StandardizedVersionString.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/ConvertTo-StandardizedVersionString.Tests.ps1 similarity index 83% rename from src/Puppet.Dsc/internal/functions/ConvertTo-StandardizedVersionString.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/ConvertTo-StandardizedVersionString.Tests.ps1 index 4e23030b..83664ade 100644 --- a/src/Puppet.Dsc/internal/functions/ConvertTo-StandardizedVersionString.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/ConvertTo-StandardizedVersionString.Tests.ps1 @@ -1,6 +1,6 @@ Describe 'ConvertTo-StandardizedVersionString' -Tag 'Unit' { BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/ConvertTo-UnescapedJson.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/ConvertTo-UnescapedJson.Tests.ps1 similarity index 88% rename from src/Puppet.Dsc/internal/functions/ConvertTo-UnescapedJson.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/ConvertTo-UnescapedJson.Tests.ps1 index 3829e77f..2f59139f 100644 --- a/src/Puppet.Dsc/internal/functions/ConvertTo-UnescapedJson.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/ConvertTo-UnescapedJson.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'ConvertTo-UnescapedJson' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { It 'Converts the object to JSON without unicode escapes' { diff --git a/src/Puppet.Dsc/internal/functions/ConvertTo-VersionBuild.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/ConvertTo-VersionBuild.Tests.ps1 similarity index 89% rename from src/Puppet.Dsc/internal/functions/ConvertTo-VersionBuild.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/ConvertTo-VersionBuild.Tests.ps1 index 045661b9..452b8941 100644 --- a/src/Puppet.Dsc/internal/functions/ConvertTo-VersionBuild.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/ConvertTo-VersionBuild.Tests.ps1 @@ -1,6 +1,6 @@ Describe 'ConvertTo-VersionBuild' -Tag 'Unit' { BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/functions/Export-PuppetModule.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Export-PuppetModule.Tests.ps1 similarity index 96% rename from src/Puppet.Dsc/functions/Export-PuppetModule.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Export-PuppetModule.Tests.ps1 index e380fbf8..23cc3988 100644 --- a/src/Puppet.Dsc/functions/Export-PuppetModule.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Export-PuppetModule.Tests.ps1 @@ -6,7 +6,7 @@ Describe 'Export-PuppetModule' -Tag 'Unit' { } BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-CimClassPropertiesList.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-CimClassPropertiesList.Tests.ps1 similarity index 90% rename from src/Puppet.Dsc/internal/functions/Get-CimClassPropertiesList.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-CimClassPropertiesList.Tests.ps1 index d841ae77..e74bdf81 100644 --- a/src/Puppet.Dsc/internal/functions/Get-CimClassPropertiesList.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-CimClassPropertiesList.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-CimClassPropertiesList' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/Get-DscResourceImplementation.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-DscResourceImplementation.Tests.ps1 similarity index 98% rename from src/Puppet.Dsc/internal/functions/Get-DscResourceImplementation.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-DscResourceImplementation.Tests.ps1 index 9321985e..dacda8a4 100644 --- a/src/Puppet.Dsc/internal/functions/Get-DscResourceImplementation.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-DscResourceImplementation.Tests.ps1 @@ -1,6 +1,6 @@ Describe 'Get-DscResourceImplementation' -Tag 'Unit' { BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') # The using statement will fail without a correct module path; # The scriptblock in Start-Job can't see the Pester TestDrive, diff --git a/src/Puppet.Dsc/internal/functions/Get-DscResourceParameterInfo.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfo.Tests.ps1 similarity index 96% rename from src/Puppet.Dsc/internal/functions/Get-DscResourceParameterInfo.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfo.Tests.ps1 index 4af7d0b6..1f9cb3a0 100644 --- a/src/Puppet.Dsc/internal/functions/Get-DscResourceParameterInfo.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfo.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-DscResourceParameterInfo' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'When the AST can be parsed for functions' { diff --git a/src/Puppet.Dsc/internal/functions/Get-DscResourceParameterInfoByCimClass.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfoByCimClass.Tests.ps1 similarity index 97% rename from src/Puppet.Dsc/internal/functions/Get-DscResourceParameterInfoByCimClass.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfoByCimClass.Tests.ps1 index 42f3c677..75922f30 100644 --- a/src/Puppet.Dsc/internal/functions/Get-DscResourceParameterInfoByCimClass.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-DscResourceParameterInfoByCimClass.Tests.ps1 @@ -6,7 +6,7 @@ Describe 'Get-DscResourceParameterInfoByCimClass' -Skip:(!$RunningElevated) -Tag Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-DscResourceTypeInformation.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-DscResourceTypeInformation.Tests.ps1 similarity index 97% rename from src/Puppet.Dsc/internal/functions/Get-DscResourceTypeInformation.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-DscResourceTypeInformation.Tests.ps1 index d357aa74..f8109d6f 100644 --- a/src/Puppet.Dsc/internal/functions/Get-DscResourceTypeInformation.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-DscResourceTypeInformation.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-DscResourceTypeInformation' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-EmbeddedCimInstance.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-EmbeddedCimInstance.Tests.ps1 similarity index 95% rename from src/Puppet.Dsc/internal/functions/Get-EmbeddedCimInstance.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-EmbeddedCimInstance.Tests.ps1 index 5d370594..b779e087 100644 --- a/src/Puppet.Dsc/internal/functions/Get-EmbeddedCimInstance.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-EmbeddedCimInstance.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-EmbeddedCimInstance' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/functions/Get-ForgeModuleInfo.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-ForgeModuleInfo.Tests.ps1 similarity index 97% rename from src/Puppet.Dsc/functions/Get-ForgeModuleInfo.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-ForgeModuleInfo.Tests.ps1 index d7396560..c805ec67 100644 --- a/src/Puppet.Dsc/functions/Get-ForgeModuleInfo.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-ForgeModuleInfo.Tests.ps1 @@ -1,6 +1,6 @@ Describe 'Get-ForgeModuleInfo' -Tag 'Unit' { BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'functions')).Replace('.Tests.ps1', '.ps1') Function New-ModuleInfo { Param( diff --git a/src/Puppet.Dsc/internal/functions/Get-LatestBuild.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-LatestBuild.Tests.ps1 similarity index 94% rename from src/Puppet.Dsc/internal/functions/Get-LatestBuild.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-LatestBuild.Tests.ps1 index afddc733..eb44b3fe 100644 --- a/src/Puppet.Dsc/internal/functions/Get-LatestBuild.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-LatestBuild.Tests.ps1 @@ -7,7 +7,7 @@ Describe 'Get-LatestBuild' -Tag 'Unit' { } BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/functions/Get-PowerShellDscModule.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-PowerShellDscModule.Tests.ps1 similarity index 94% rename from src/Puppet.Dsc/functions/Get-PowerShellDscModule.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-PowerShellDscModule.Tests.ps1 index 693e62d3..55940c4b 100644 --- a/src/Puppet.Dsc/functions/Get-PowerShellDscModule.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-PowerShellDscModule.Tests.ps1 @@ -1,6 +1,6 @@ Describe 'Get-PowerShellDscModule' -Tag 'Unit' { BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/Get-ProviderContent.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-ProviderContent.Tests.ps1 similarity index 89% rename from src/Puppet.Dsc/internal/functions/Get-ProviderContent.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-ProviderContent.Tests.ps1 index dea98650..bc0c5dc1 100644 --- a/src/Puppet.Dsc/internal/functions/Get-ProviderContent.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-ProviderContent.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-ProviderContent' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-PuppetDataType.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-PuppetDataType.Tests.ps1 similarity index 97% rename from src/Puppet.Dsc/internal/functions/Get-PuppetDataType.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-PuppetDataType.Tests.ps1 index f1cd04fb..b1cd7e3b 100644 --- a/src/Puppet.Dsc/internal/functions/Get-PuppetDataType.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-PuppetDataType.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-PuppetDataType' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-PuppetModuleVersion.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-PuppetModuleVersion.Tests.ps1 similarity index 87% rename from src/Puppet.Dsc/internal/functions/Get-PuppetModuleVersion.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-PuppetModuleVersion.Tests.ps1 index 21a20a20..9bca5c62 100644 --- a/src/Puppet.Dsc/internal/functions/Get-PuppetModuleVersion.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-PuppetModuleVersion.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-PuppetModuleVersion' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/functions/Get-PuppetizedModuleName.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-PuppetizedModuleName.Tests.ps1 similarity index 88% rename from src/Puppet.Dsc/functions/Get-PuppetizedModuleName.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-PuppetizedModuleName.Tests.ps1 index c5cc6d03..1b11fc3a 100644 --- a/src/Puppet.Dsc/functions/Get-PuppetizedModuleName.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-PuppetizedModuleName.Tests.ps1 @@ -3,7 +3,7 @@ Describe 'Get-PuppetizedModuleName' -Tag 'Unit' { $ModuleRootPath = Split-Path -Parent $PSCommandPath | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-ReadmeContent.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-ReadmeContent.Tests.ps1 similarity index 98% rename from src/Puppet.Dsc/internal/functions/Get-ReadmeContent.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-ReadmeContent.Tests.ps1 index 61cbf1ce..8daff986 100644 --- a/src/Puppet.Dsc/internal/functions/Get-ReadmeContent.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-ReadmeContent.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-ReadmeContent' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-ShortType.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-ShortType.Tests.ps1 similarity index 85% rename from src/Puppet.Dsc/internal/functions/Get-ShortType.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-ShortType.Tests.ps1 index 0fdf8d0d..44a41c77 100644 --- a/src/Puppet.Dsc/internal/functions/Get-ShortType.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-ShortType.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-ShortType' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic functionality' { diff --git a/src/Puppet.Dsc/internal/functions/Get-TypeContent.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-TypeContent.Tests.ps1 similarity index 94% rename from src/Puppet.Dsc/internal/functions/Get-TypeContent.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-TypeContent.Tests.ps1 index 560d4f32..bc60eb85 100644 --- a/src/Puppet.Dsc/internal/functions/Get-TypeContent.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-TypeContent.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-TypeContent' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/internal/functions/Get-TypeParameterContent.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-TypeParameterContent.Tests.ps1 similarity index 96% rename from src/Puppet.Dsc/internal/functions/Get-TypeParameterContent.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-TypeParameterContent.Tests.ps1 index d7760126..e4fc87c2 100644 --- a/src/Puppet.Dsc/internal/functions/Get-TypeParameterContent.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Get-TypeParameterContent.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Get-TypeParameterContent' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/functions/Get-UnpuppetizedDscModuleVersion.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Get-UnpuppetizedDscModuleVersion.Tests.ps1 similarity index 100% rename from src/Puppet.Dsc/functions/Get-UnpuppetizedDscModuleVersion.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Get-UnpuppetizedDscModuleVersion.Tests.ps1 diff --git a/src/Puppet.Dsc/internal/functions/Initialize-DscResourceCimClass.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Initialize-DscResourceCimClass.Tests.ps1 similarity index 92% rename from src/Puppet.Dsc/internal/functions/Initialize-DscResourceCimClass.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Initialize-DscResourceCimClass.Tests.ps1 index 80bef87a..d8dfc82e 100644 --- a/src/Puppet.Dsc/internal/functions/Initialize-DscResourceCimClass.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Initialize-DscResourceCimClass.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Initialize-DscResourceCimClass' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'basic functionality' { diff --git a/src/Puppet.Dsc/internal/functions/Initialize-PuppetModule.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Initialize-PuppetModule.Tests.ps1 similarity index 96% rename from src/Puppet.Dsc/internal/functions/Initialize-PuppetModule.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Initialize-PuppetModule.Tests.ps1 index 4c3f4cc3..6b9ad07d 100644 --- a/src/Puppet.Dsc/internal/functions/Initialize-PuppetModule.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Initialize-PuppetModule.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Initialize-PuppetModule' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Invoke-PdkCommand.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Invoke-PdkCommand.Tests.ps1 similarity index 95% rename from src/Puppet.Dsc/internal/functions/Invoke-PdkCommand.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Invoke-PdkCommand.Tests.ps1 index ff11c3e1..c98eab37 100644 --- a/src/Puppet.Dsc/internal/functions/Invoke-PdkCommand.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Invoke-PdkCommand.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Invoke-PdkCommand' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/functions/New-PuppetDscModule.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/New-PuppetDscModule.Tests.ps1 similarity index 99% rename from src/Puppet.Dsc/functions/New-PuppetDscModule.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/New-PuppetDscModule.Tests.ps1 index 05953416..834b966c 100644 --- a/src/Puppet.Dsc/functions/New-PuppetDscModule.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/New-PuppetDscModule.Tests.ps1 @@ -3,7 +3,7 @@ Describe 'New-PuppetDscModule' -Tag 'Unit' { $ModuleRootPath = Split-Path -Parent $PSCommandPath | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Out-Utf8File.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Out-Utf8File.Tests.ps1 similarity index 92% rename from src/Puppet.Dsc/internal/functions/Out-Utf8File.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Out-Utf8File.Tests.ps1 index f4d62c26..25c06381 100644 --- a/src/Puppet.Dsc/internal/functions/Out-Utf8File.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Out-Utf8File.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Out-Utf8File' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/functions/Publish-NewDscModuleVersion.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Publish-NewDscModuleVersion.Tests.ps1 similarity index 100% rename from src/Puppet.Dsc/functions/Publish-NewDscModuleVersion.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Publish-NewDscModuleVersion.Tests.ps1 diff --git a/src/Puppet.Dsc/functions/Publish-PuppetModule.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Publish-PuppetModule.Tests.ps1 similarity index 100% rename from src/Puppet.Dsc/functions/Publish-PuppetModule.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Publish-PuppetModule.Tests.ps1 diff --git a/src/Puppet.Dsc/internal/functions/Set-PSModulePath.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Set-PSModulePath.Tests.ps1 similarity index 89% rename from src/Puppet.Dsc/internal/functions/Set-PSModulePath.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Set-PSModulePath.Tests.ps1 index 6d53fd32..5884a45c 100644 --- a/src/Puppet.Dsc/internal/functions/Set-PSModulePath.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Set-PSModulePath.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Set-PSModulePath' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/Set-PuppetModuleVersion.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1 similarity index 96% rename from src/Puppet.Dsc/internal/functions/Set-PuppetModuleVersion.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1 index 709a480b..9e473583 100644 --- a/src/Puppet.Dsc/internal/functions/Set-PuppetModuleVersion.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Set-PuppetModuleVersion.Tests.ps1 @@ -6,7 +6,7 @@ Describe 'Update-PuppetModuleMetadata' -Tag 'Unit' { Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" } BeforeAll { - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Test-DscResourcePropertyParameterStatus.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Test-DscResourcePropertyParameterStatus.Tests.ps1 similarity index 93% rename from src/Puppet.Dsc/internal/functions/Test-DscResourcePropertyParameterStatus.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Test-DscResourcePropertyParameterStatus.Tests.ps1 index 31dd3667..060ce317 100644 --- a/src/Puppet.Dsc/internal/functions/Test-DscResourcePropertyParameterStatus.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Test-DscResourcePropertyParameterStatus.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Test-DscResourcePropertyParameterStatus' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/Test-EmbeddedInstance.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Test-EmbeddedInstance.Tests.ps1 similarity index 87% rename from src/Puppet.Dsc/internal/functions/Test-EmbeddedInstance.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Test-EmbeddedInstance.Tests.ps1 index 217210fe..67a1f3cb 100644 --- a/src/Puppet.Dsc/internal/functions/Test-EmbeddedInstance.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Test-EmbeddedInstance.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Test-EmbeddedInstance' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/Test-RunningElevated.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Test-RunningElevated.Tests.ps1 similarity index 82% rename from src/Puppet.Dsc/internal/functions/Test-RunningElevated.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Test-RunningElevated.Tests.ps1 index cc720517..0d754050 100644 --- a/src/Puppet.Dsc/internal/functions/Test-RunningElevated.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Test-RunningElevated.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Test-RunningElevated' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/Test-SymLinkedItem.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Test-SymLinkedItem.Tests.ps1 similarity index 92% rename from src/Puppet.Dsc/internal/functions/Test-SymLinkedItem.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Test-SymLinkedItem.Tests.ps1 index 4ee2bcba..da84818f 100644 --- a/src/Puppet.Dsc/internal/functions/Test-SymLinkedItem.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Test-SymLinkedItem.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Test-SymLinkedItem' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } Context 'Basic verification' { diff --git a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleChangelog.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1 similarity index 97% rename from src/Puppet.Dsc/internal/functions/Update-PuppetModuleChangelog.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1 index f82b3929..ee26975a 100644 --- a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleChangelog.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleChangelog.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'UpdatePuppetModuleChangelog' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope Puppet.Dsc { diff --git a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleFixture.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleFixture.Tests.ps1 similarity index 96% rename from src/Puppet.Dsc/internal/functions/Update-PuppetModuleFixture.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Update-PuppetModuleFixture.Tests.ps1 index 3f27a15a..4eb9995d 100644 --- a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleFixture.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleFixture.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Update-PuppetModuleFixture' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleMetadata.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1 similarity index 98% rename from src/Puppet.Dsc/internal/functions/Update-PuppetModuleMetadata.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1 index 4e3afb81..fe00042b 100644 --- a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleMetadata.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleMetadata.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Update-PuppetModuleMetadata' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc { diff --git a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleReadme.Tests.ps1 b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1 similarity index 98% rename from src/Puppet.Dsc/internal/functions/Update-PuppetModuleReadme.Tests.ps1 rename to src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1 index 70138bf8..a5eb563c 100644 --- a/src/Puppet.Dsc/internal/functions/Update-PuppetModuleReadme.Tests.ps1 +++ b/src/Puppet.Dsc/tests/Unit/Update-PuppetModuleReadme.Tests.ps1 @@ -4,7 +4,7 @@ Describe 'Update-PuppetModuleReadme' -Tag 'Unit' { Split-Path -Parent | Split-Path -Parent Import-Module "$ModuleRootPath/Puppet.Dsc.psd1" - . $PSCommandPath.Replace('.Tests.ps1', '.ps1') + . ($PSCommandPath.Replace('tests\Unit', 'internal\functions')).Replace('.Tests.ps1', '.ps1') } InModuleScope puppet.dsc {