From 4f4cbbac2e072bf85d263a0829e6caa2fe96597c Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Thu, 20 Aug 2015 11:49:01 -0700 Subject: [PATCH 01/15] added tests to get working in linux --- src/pester-tests/Test-Remove-Item.Tests.ps1 | 152 ++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 src/pester-tests/Test-Remove-Item.Tests.ps1 diff --git a/src/pester-tests/Test-Remove-Item.Tests.ps1 b/src/pester-tests/Test-Remove-Item.Tests.ps1 new file mode 100644 index 000000000..ef8244fd5 --- /dev/null +++ b/src/pester-tests/Test-Remove-Item.Tests.ps1 @@ -0,0 +1,152 @@ +Describe "Test-Remove-Item" { + $testpath = "/tmp/" + $testfile = "testfile.txt" + $testfilepath = $testpath + $testfile + Context "File removal Tests" { + BeforeEach { + # redundant code in case the AfterEach fails + if (Test-Path $testfilepath) + { + Remove-Item $testfilepath -Force + } + + New-Item -Name $testfile -Path $testpath -ItemType "file" -Value "lorem ipsum" + + Test-path $testfilepath | Should Be $true + } + + AfterEach { + if (Test-Path $testfilepath) + { + Remove-Item $testfilepath -Force + } + + Test-Path $testfilepath | Should Be $false + } + + It "Should be able to be called on a regular file without error using the Path switch" { + { Remove-Item -Path $testfilepath } | Should Not Throw + } + + It "Should be able to be called on a file without the Path switch" { + { Remove-Item $testfilepath } | Should Not Throw + } + + It "Should be able to call the rm alias" { + { rm $testfilepath } | Should Not Throw + } + + It "Should be able to call the del alias" { + { del $testfilepath } | Should Not Throw + } + + It "Should be able to call the erase alias" { + { erase $testfilepath } | Should Not Throw + } + + It "Should be able to call the ri alias" { + { ri $testfilepath } | Should Not Throw + } + + It "Should not be able to remove a read-only document without using the force switch" { + # Set to read only + Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $true + # attempt to remove the file + { Remove-Item $testfilepath -ErrorAction SilentlyContinue } | Should Not Throw + # validate + Test-Path $testfilepath | Should Be $true + + # set to not be read only + Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $false + # remove + Remove-Item $testfilepath -Force + # Validate + Test-Path $testfilepath | Should Be $false + } + + It "Should be able to remove all files matching a regular expression with the include switch" { + # Create multiple files with specific string + New-Item -Name file1.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file2.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file3.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + # Create a single file that does not match that string - already done in BeforeEach + + # Delete the specific string + Remove-Item /tmp/* -Include file*.txt + # validate that the string under test was deleted, and the nonmatching strings still exist + Test-path /tmp/file1.txt | Should Be $false + Test-path /tmp/file2.txt | Should Be $false + Test-path /tmp/file3.txt | Should Be $false + Test-Path $testfilepath | Should Be $true + + # Delete the non-matching strings + Remove-Item $testfilepath + } + + It "Should be able to not remove any files matching a regular expression with the exclude switch" { + # Create multiple files with specific string + New-Item -Name file1.wav -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file2.wav -Path $testpath -ItemType "file" -Value "lorem ipsum" + + # Create a single file that does not match that string + New-Item -Name file1.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file2.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + + # Delete the specific string + Remove-Item /tmp/file* -Exclude *.wav -Include *.txt + + # validate that the string under test was deleted, and the nonmatching strings still exist + Test-Path /tmp/file1.wav | Should Be $true + Test-Path /tmp/file2.wav | Should Be $true + Test-Path /tmp/file1.txt | Should Be $false + Test-path /tmp/file2.txt | Should Be $false + + # Delete the non-matching strings + Remove-Item /tmp/file1.wav + Remove-Item /tmp/file2.wav + + Test-Path /tmp/file1.wav | Should Be $false + Test-Path /tmp/file2.wav | Should Be $false + } + } + + Context "Directory Removal Tests" { + $testdirectory = "/tmp/testdir" + $testsubdirectory = $testdirectory + "/subd" + BeforeEach{ + if (Test-Path $testdirectory) + { + Remove-Item $testdirectory -Force + } + + test-path $testdirectory | Should Be $false + + New-Item -Name "testdir" -Path "/tmp/" -ItemType "directory" + + test-path $testdirectory | Should Be $true + } + + AfterEach { + if (Test-Path $testdirectory) + { + Remove-Item $testdirectory -Recurse -Force + } + + Test-Path $testdirectory | Should Be $false + } + + It "Should be able to remove a directory" { + { Remove-Item $testdirectory } | Should Not Throw + } + + It "Should be able to recursively delete subfolders" { + New-Item -Name "subd" -Path $testdirectory -ItemType "directory" + New-Item -Name $testfile -Path $testsubdirectory -ItemType "file" -Value "lorem ipsum" + + $complexDirectory = $testsubdirectory + "/" + $testfile + test-path $complexDirectory | Should Be $true + + { Remove-Item $testdirectory -Recurse} | Should Not Throw + } + } +} From 95e932d6d0a55d7283450edf737cffc241b1a39d Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Fri, 21 Aug 2015 15:51:27 -0700 Subject: [PATCH 02/15] removed AfterEach block because it's not required --- src/pester-tests/Test-Remove-Item.Tests.ps1 | 27 ++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/pester-tests/Test-Remove-Item.Tests.ps1 b/src/pester-tests/Test-Remove-Item.Tests.ps1 index ef8244fd5..fb21fbd58 100644 --- a/src/pester-tests/Test-Remove-Item.Tests.ps1 +++ b/src/pester-tests/Test-Remove-Item.Tests.ps1 @@ -11,55 +11,60 @@ } New-Item -Name $testfile -Path $testpath -ItemType "file" -Value "lorem ipsum" - - Test-path $testfilepath | Should Be $true - } - - AfterEach { - if (Test-Path $testfilepath) - { - Remove-Item $testfilepath -Force - } - - Test-Path $testfilepath | Should Be $false } It "Should be able to be called on a regular file without error using the Path switch" { { Remove-Item -Path $testfilepath } | Should Not Throw + + Test-Path $testfilepath | Should Be $false } It "Should be able to be called on a file without the Path switch" { { Remove-Item $testfilepath } | Should Not Throw + + Test-Path $testfilepath | Should Be $false } It "Should be able to call the rm alias" { { rm $testfilepath } | Should Not Throw + + Test-Path $testfilepath | Should Be $false } It "Should be able to call the del alias" { { del $testfilepath } | Should Not Throw + + Test-Path $testfilepath | Should Be $false } It "Should be able to call the erase alias" { { erase $testfilepath } | Should Not Throw + + Test-Path $testfilepath | Should Be $false } It "Should be able to call the ri alias" { { ri $testfilepath } | Should Not Throw + + Test-Path $testfilepath | Should Be $false } It "Should not be able to remove a read-only document without using the force switch" { # Set to read only Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $true + # attempt to remove the file { Remove-Item $testfilepath -ErrorAction SilentlyContinue } | Should Not Throw + # validate Test-Path $testfilepath | Should Be $true # set to not be read only Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $false + # remove Remove-Item $testfilepath -Force + # Validate Test-Path $testfilepath | Should Be $false } From 8091785240a61948441a666a8af9a56aae54f01f Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Fri, 21 Aug 2015 15:57:34 -0700 Subject: [PATCH 03/15] Fixed whitespace and directory test assertions --- src/pester-tests/Test-Remove-Item.Tests.ps1 | 105 ++++++++++---------- 1 file changed, 50 insertions(+), 55 deletions(-) diff --git a/src/pester-tests/Test-Remove-Item.Tests.ps1 b/src/pester-tests/Test-Remove-Item.Tests.ps1 index fb21fbd58..754ed84b0 100644 --- a/src/pester-tests/Test-Remove-Item.Tests.ps1 +++ b/src/pester-tests/Test-Remove-Item.Tests.ps1 @@ -50,68 +50,68 @@ } It "Should not be able to remove a read-only document without using the force switch" { - # Set to read only - Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $true + # Set to read only + Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $true - # attempt to remove the file - { Remove-Item $testfilepath -ErrorAction SilentlyContinue } | Should Not Throw + # attempt to remove the file + { Remove-Item $testfilepath -ErrorAction SilentlyContinue } | Should Not Throw - # validate - Test-Path $testfilepath | Should Be $true + # validate + Test-Path $testfilepath | Should Be $true - # set to not be read only - Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $false + # set to not be read only + Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $false - # remove - Remove-Item $testfilepath -Force + # remove + Remove-Item $testfilepath -Force - # Validate - Test-Path $testfilepath | Should Be $false - } + # Validate + Test-Path $testfilepath | Should Be $false + } It "Should be able to remove all files matching a regular expression with the include switch" { - # Create multiple files with specific string - New-Item -Name file1.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" - New-Item -Name file2.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" - New-Item -Name file3.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" - # Create a single file that does not match that string - already done in BeforeEach + # Create multiple files with specific string + New-Item -Name file1.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file2.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file3.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + # Create a single file that does not match that string - already done in BeforeEach - # Delete the specific string - Remove-Item /tmp/* -Include file*.txt - # validate that the string under test was deleted, and the nonmatching strings still exist - Test-path /tmp/file1.txt | Should Be $false - Test-path /tmp/file2.txt | Should Be $false - Test-path /tmp/file3.txt | Should Be $false - Test-Path $testfilepath | Should Be $true + # Delete the specific string + Remove-Item /tmp/* -Include file*.txt + # validate that the string under test was deleted, and the nonmatching strings still exist + Test-path /tmp/file1.txt | Should Be $false + Test-path /tmp/file2.txt | Should Be $false + Test-path /tmp/file3.txt | Should Be $false + Test-Path $testfilepath | Should Be $true - # Delete the non-matching strings - Remove-Item $testfilepath + # Delete the non-matching strings + Remove-Item $testfilepath } It "Should be able to not remove any files matching a regular expression with the exclude switch" { - # Create multiple files with specific string - New-Item -Name file1.wav -Path $testpath -ItemType "file" -Value "lorem ipsum" - New-Item -Name file2.wav -Path $testpath -ItemType "file" -Value "lorem ipsum" + # Create multiple files with specific string + New-Item -Name file1.wav -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file2.wav -Path $testpath -ItemType "file" -Value "lorem ipsum" - # Create a single file that does not match that string - New-Item -Name file1.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" - New-Item -Name file2.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + # Create a single file that does not match that string + New-Item -Name file1.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" + New-Item -Name file2.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" - # Delete the specific string - Remove-Item /tmp/file* -Exclude *.wav -Include *.txt + # Delete the specific string + Remove-Item /tmp/file* -Exclude *.wav -Include *.txt - # validate that the string under test was deleted, and the nonmatching strings still exist - Test-Path /tmp/file1.wav | Should Be $true - Test-Path /tmp/file2.wav | Should Be $true - Test-Path /tmp/file1.txt | Should Be $false - Test-path /tmp/file2.txt | Should Be $false + # validate that the string under test was deleted, and the nonmatching strings still exist + Test-Path /tmp/file1.wav | Should Be $true + Test-Path /tmp/file2.wav | Should Be $true + Test-Path /tmp/file1.txt | Should Be $false + Test-path /tmp/file2.txt | Should Be $false - # Delete the non-matching strings - Remove-Item /tmp/file1.wav - Remove-Item /tmp/file2.wav + # Delete the non-matching strings + Remove-Item /tmp/file1.wav + Remove-Item /tmp/file2.wav - Test-Path /tmp/file1.wav | Should Be $false - Test-Path /tmp/file2.wav | Should Be $false + Test-Path /tmp/file1.wav | Should Be $false + Test-Path /tmp/file2.wav | Should Be $false } } @@ -131,17 +131,10 @@ test-path $testdirectory | Should Be $true } - AfterEach { - if (Test-Path $testdirectory) - { - Remove-Item $testdirectory -Recurse -Force - } - - Test-Path $testdirectory | Should Be $false - } - It "Should be able to remove a directory" { { Remove-Item $testdirectory } | Should Not Throw + + Test-Path $testdirectory | Should Be $false } It "Should be able to recursively delete subfolders" { @@ -152,6 +145,8 @@ test-path $complexDirectory | Should Be $true { Remove-Item $testdirectory -Recurse} | Should Not Throw + + Test-Path $testdirectory | Should Be $false } } -} +} From 4ded5c5cd930a611fa4d54b01be89b04882daa63 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Mon, 24 Aug 2015 11:38:32 -0700 Subject: [PATCH 04/15] added environment variable tests --- .../Test-Environment-Variables.Tests.ps1 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/pester-tests/Test-Environment-Variables.Tests.ps1 b/src/pester-tests/Test-Environment-Variables.Tests.ps1 index 6bde8f289..28b58fa74 100644 --- a/src/pester-tests/Test-Environment-Variables.Tests.ps1 +++ b/src/pester-tests/Test-Environment-Variables.Tests.ps1 @@ -1,15 +1,21 @@ Describe "Test-Environment-Variables" { - It "Should have environment variable" { + It "Should have environment variables" { Get-Item ENV: | Should Not BeNullOrEmpty } - It "Should be able to access the members of the environment variable in two ways" { - (Get-Item ENV:HOME).Value | Should be "/root" + It "Should be able to access the members of the environment variable" { + $test = /usr/bin/whoami + $expected = "/" + $test + (Get-Item ENV:HOME).Value | Should Be $expected (Get-Item ENV:HOSTNAME).Value | Should Not BeNullOrEmpty (Get-Item ENV:PATH).Value | Should Not BeNullOrEmpty + } + + It "Should be able to set the environment variables" { + { $ENV:TESTENVIRONMENTVARIABLE = "this is a test environment variable" } | Should Not Throw + + $ENV:TESTENVIRONMENTVARIABLE | Should Not BeNullOrEmpty + $ENV:TESTENVIRONMENTVARIABLE | Should Be "this is a test environment variable" - (ls ENV:HOME).Value | Should be "/root" - (ls ENV:HOSTNAME).Value | Should Not BeNullOrEmpty - (ls ENV:PATH).Value | Should Not BeNullOrEmpty } } From a0ba3b6b8fe93d9e3f95641255cd4581e7b4ace6 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Mon, 24 Aug 2015 13:39:24 -0700 Subject: [PATCH 05/15] modified to work under jenkins --- src/pester-tests/Test-Environment-Variables.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pester-tests/Test-Environment-Variables.Tests.ps1 b/src/pester-tests/Test-Environment-Variables.Tests.ps1 index 28b58fa74..8b637dcca 100644 --- a/src/pester-tests/Test-Environment-Variables.Tests.ps1 +++ b/src/pester-tests/Test-Environment-Variables.Tests.ps1 @@ -4,8 +4,8 @@ } It "Should be able to access the members of the environment variable" { - $test = /usr/bin/whoami - $expected = "/" + $test + $expected = /bin/bash -c "cd ~ && pwd" + (Get-Item ENV:HOME).Value | Should Be $expected (Get-Item ENV:HOSTNAME).Value | Should Not BeNullOrEmpty (Get-Item ENV:PATH).Value | Should Not BeNullOrEmpty From f7393055025cee37132312aa7b06b04a37419013 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Mon, 24 Aug 2015 13:54:13 -0700 Subject: [PATCH 06/15] deleted superfluous assertion --- src/pester-tests/Test-Environment-Variables.Tests.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pester-tests/Test-Environment-Variables.Tests.ps1 b/src/pester-tests/Test-Environment-Variables.Tests.ps1 index 8b637dcca..5b3cc1ce5 100644 --- a/src/pester-tests/Test-Environment-Variables.Tests.ps1 +++ b/src/pester-tests/Test-Environment-Variables.Tests.ps1 @@ -7,7 +7,6 @@ $expected = /bin/bash -c "cd ~ && pwd" (Get-Item ENV:HOME).Value | Should Be $expected - (Get-Item ENV:HOSTNAME).Value | Should Not BeNullOrEmpty (Get-Item ENV:PATH).Value | Should Not BeNullOrEmpty } From ed86ae170efa65fbfb51aa74087e6588055a78e6 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Mon, 24 Aug 2015 14:47:06 -0700 Subject: [PATCH 07/15] added tests to validate individual environmental variables --- .../Test-Environment-Variables.Tests.ps1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pester-tests/Test-Environment-Variables.Tests.ps1 b/src/pester-tests/Test-Environment-Variables.Tests.ps1 index 5b3cc1ce5..0712237e1 100644 --- a/src/pester-tests/Test-Environment-Variables.Tests.ps1 +++ b/src/pester-tests/Test-Environment-Variables.Tests.ps1 @@ -7,7 +7,6 @@ $expected = /bin/bash -c "cd ~ && pwd" (Get-Item ENV:HOME).Value | Should Be $expected - (Get-Item ENV:PATH).Value | Should Not BeNullOrEmpty } It "Should be able to set the environment variables" { @@ -17,4 +16,18 @@ $ENV:TESTENVIRONMENTVARIABLE | Should Be "this is a test environment variable" } + + It "Should contain /bin in the PATH" { + $ENV:PATH | Should Match "/bin" + } + + It "Should have the correct HOSTNAME" { + $expected = /bin/bash -c hostname + + $ENV:HOSTNAME | Should Be $expected + } + + It "Should have a nonempty PATH" { + $ENV:PATH | Should Not BeNullOrEmpty + } } From f919006d46a4ebae7920edd877f346e95979e64f Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Mon, 24 Aug 2015 15:04:50 -0700 Subject: [PATCH 08/15] re-ordered tests to indicate a logical progression to facilitate debugging added tests to validate individual environmental variables --- .../Test-Environment-Variables.Tests.ps1 | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pester-tests/Test-Environment-Variables.Tests.ps1 b/src/pester-tests/Test-Environment-Variables.Tests.ps1 index 0712237e1..d659ae56f 100644 --- a/src/pester-tests/Test-Environment-Variables.Tests.ps1 +++ b/src/pester-tests/Test-Environment-Variables.Tests.ps1 @@ -3,10 +3,18 @@ Get-Item ENV: | Should Not BeNullOrEmpty } + It "Should have a nonempty PATH" { + $ENV:PATH | Should Not BeNullOrEmpty + } + + It "Should contain /bin in the PATH" { + $ENV:PATH | Should Match "/bin" + } + It "Should be able to access the members of the environment variable" { $expected = /bin/bash -c "cd ~ && pwd" - (Get-Item ENV:HOME).Value | Should Be $expected + (Get-Item ENV:HOME).Value | Should Be $expected } It "Should be able to set the environment variables" { @@ -17,17 +25,9 @@ } - It "Should contain /bin in the PATH" { - $ENV:PATH | Should Match "/bin" - } - It "Should have the correct HOSTNAME" { - $expected = /bin/bash -c hostname + $expected = /bin/hostname $ENV:HOSTNAME | Should Be $expected } - - It "Should have a nonempty PATH" { - $ENV:PATH | Should Not BeNullOrEmpty - } } From 1c1c1dacaaa1460119154bc0c974ccbf7860bb1f Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Tue, 25 Aug 2015 10:15:21 -0700 Subject: [PATCH 09/15] turned repeated string into a variable --- src/pester-tests/Test-Environment-Variables.Tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pester-tests/Test-Environment-Variables.Tests.ps1 b/src/pester-tests/Test-Environment-Variables.Tests.ps1 index d659ae56f..4bf643ffe 100644 --- a/src/pester-tests/Test-Environment-Variables.Tests.ps1 +++ b/src/pester-tests/Test-Environment-Variables.Tests.ps1 @@ -18,10 +18,11 @@ } It "Should be able to set the environment variables" { - { $ENV:TESTENVIRONMENTVARIABLE = "this is a test environment variable" } | Should Not Throw + $expected = "this is a test environment variable" + { $ENV:TESTENVIRONMENTVARIABLE = $expected } | Should Not Throw $ENV:TESTENVIRONMENTVARIABLE | Should Not BeNullOrEmpty - $ENV:TESTENVIRONMENTVARIABLE | Should Be "this is a test environment variable" + $ENV:TESTENVIRONMENTVARIABLE | Should Be $expected } From f8179859b154d006c1b15a91c2b062b907e983d5 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Wed, 26 Aug 2015 14:34:44 -0700 Subject: [PATCH 10/15] bringing submodules up to date --- src/monad | 2 +- src/monad-ext | 2 +- src/monad-native | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/monad b/src/monad index df562ce7e..2793b76e2 160000 --- a/src/monad +++ b/src/monad @@ -1 +1 @@ -Subproject commit df562ce7ecd60fb42e30702116123c8a58bf04d4 +Subproject commit 2793b76e2d48f012a82b8e9106b9e9f496d3b785 diff --git a/src/monad-ext b/src/monad-ext index 20468e65d..ea31eca62 160000 --- a/src/monad-ext +++ b/src/monad-ext @@ -1 +1 @@ -Subproject commit 20468e65dac6fa5a1b4cf6971ff490e548531822 +Subproject commit ea31eca6223992fa9729af67518930b6b45829d3 diff --git a/src/monad-native b/src/monad-native index a99c56eea..440cf6a23 160000 --- a/src/monad-native +++ b/src/monad-native @@ -1 +1 @@ -Subproject commit a99c56eea3264b8c492bc0edf5e3a65102397af9 +Subproject commit 440cf6a236067eba2d5dcfd5e3707a36295cee97 From 8456bf9d4d1450c413a7a0c66890795688079096 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Wed, 26 Aug 2015 15:13:12 -0700 Subject: [PATCH 11/15] added modifications from code review. --- src/pester-tests/Test-Remove-Item.Tests.ps1 | 37 +++++++-------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/src/pester-tests/Test-Remove-Item.Tests.ps1 b/src/pester-tests/Test-Remove-Item.Tests.ps1 index 754ed84b0..2c1c0d994 100644 --- a/src/pester-tests/Test-Remove-Item.Tests.ps1 +++ b/src/pester-tests/Test-Remove-Item.Tests.ps1 @@ -4,13 +4,10 @@ $testfilepath = $testpath + $testfile Context "File removal Tests" { BeforeEach { - # redundant code in case the AfterEach fails - if (Test-Path $testfilepath) - { - Remove-Item $testfilepath -Force - } + New-Item -Name $testfile -Path $testpath -ItemType "file" -Value "lorem ipsum" -Force + + Test-Path $testfilepath | Should Be $true - New-Item -Name $testfile -Path $testpath -ItemType "file" -Value "lorem ipsum" } It "Should be able to be called on a regular file without error using the Path switch" { @@ -54,18 +51,15 @@ Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $true # attempt to remove the file - { Remove-Item $testfilepath -ErrorAction SilentlyContinue } | Should Not Throw + { Remove-Item $testfilepath } | Should Not Throw # validate Test-Path $testfilepath | Should Be $true - # set to not be read only - Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $false - - # remove + # remove using the -force switch on the readonly object Remove-Item $testfilepath -Force - # Validate + # Validate Test-Path $testfilepath | Should Be $false } @@ -82,10 +76,12 @@ Test-path /tmp/file1.txt | Should Be $false Test-path /tmp/file2.txt | Should Be $false Test-path /tmp/file3.txt | Should Be $false - Test-Path $testfilepath | Should Be $true + Test-Path $testfilepath | Should Be $true # Delete the non-matching strings Remove-Item $testfilepath + + Test-Path $testfilepath | Should Be $false } It "Should be able to not remove any files matching a regular expression with the exclude switch" { @@ -95,7 +91,6 @@ # Create a single file that does not match that string New-Item -Name file1.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" - New-Item -Name file2.txt -Path $testpath -ItemType "file" -Value "lorem ipsum" # Delete the specific string Remove-Item /tmp/file* -Exclude *.wav -Include *.txt @@ -104,7 +99,6 @@ Test-Path /tmp/file1.wav | Should Be $true Test-Path /tmp/file2.wav | Should Be $true Test-Path /tmp/file1.txt | Should Be $false - Test-path /tmp/file2.txt | Should Be $false # Delete the non-matching strings Remove-Item /tmp/file1.wav @@ -118,17 +112,10 @@ Context "Directory Removal Tests" { $testdirectory = "/tmp/testdir" $testsubdirectory = $testdirectory + "/subd" - BeforeEach{ - if (Test-Path $testdirectory) - { - Remove-Item $testdirectory -Force - } + BeforeEach { + New-Item -Name "testdir" -Path "/tmp/" -ItemType "directory" -Force - test-path $testdirectory | Should Be $false - - New-Item -Name "testdir" -Path "/tmp/" -ItemType "directory" - - test-path $testdirectory | Should Be $true + Test-Path $testdirectory | Should Be $true } It "Should be able to remove a directory" { From 8501e6e4abb63081a0ff2e3c2d1ab1866fc79f82 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Wed, 26 Aug 2015 15:55:44 -0700 Subject: [PATCH 12/15] fixing issue with errorAction not suppressed- produces false positives on the test logs --- src/pester-tests/Test-Remove-Item.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pester-tests/Test-Remove-Item.Tests.ps1 b/src/pester-tests/Test-Remove-Item.Tests.ps1 index 2c1c0d994..017a461d7 100644 --- a/src/pester-tests/Test-Remove-Item.Tests.ps1 +++ b/src/pester-tests/Test-Remove-Item.Tests.ps1 @@ -51,7 +51,7 @@ Set-ItemProperty -Path $testfilepath -Name IsReadOnly -Value $true # attempt to remove the file - { Remove-Item $testfilepath } | Should Not Throw + { Remove-Item $testfilepath -ErrorAction SilentlyContinue } | Should Not Throw # validate Test-Path $testfilepath | Should Be $true From 913b5a97d09d18104b934d24a2897cb38d207a44 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 28 Aug 2015 10:12:27 -0700 Subject: [PATCH 13/15] Pin src/monad to develop-2015-08-28 Build files updated. Patches squashed and rebased. --- scripts/gen/SYS_AUTO/ParserStrings.cs | 72 ++++++++++++++ scripts/gen/SYS_AUTO/ParserStrings.resources | Bin 58579 -> 59889 bytes .../gen/SYS_AUTO/RemotingErrorIdStrings.cs | 90 ++++++++++++++++++ .../SYS_AUTO/RemotingErrorIdStrings.resources | Bin 71102 -> 73027 bytes src/monad | 2 +- 5 files changed, 163 insertions(+), 1 deletion(-) diff --git a/scripts/gen/SYS_AUTO/ParserStrings.cs b/scripts/gen/SYS_AUTO/ParserStrings.cs index 5735d3e3c..b8fe6662b 100644 --- a/scripts/gen/SYS_AUTO/ParserStrings.cs +++ b/scripts/gen/SYS_AUTO/ParserStrings.cs @@ -595,6 +595,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to Failed to convert the value of CimProperty {0} to the property value of class {1}.. + /// + internal static string ConvertCimPropertyToObjectPropertyFailed { + get { + return ResourceManager.GetString("ConvertCimPropertyToObjectPropertyFailed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Could not get dispatch ID for {0} (error: {1}).. /// @@ -838,6 +847,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to Keyword '{0}' already defined in the configuration.. + /// + internal static string DuplicateKeywordDefinition { + get { + return ResourceManager.GetString("DuplicateKeywordDefinition", resourceCulture); + } + } + /// /// Looks up a localized string similar to Duplicate named arguments '{0}' are not allowed.. /// @@ -1090,6 +1108,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to Property {0} of PowerShell class {1} is not declared as array type, but defined in its configuration instance as instance array type.. + /// + internal static string ExpectArrayTypeOfPropertyInPSClass { + get { + return ResourceManager.GetString("ExpectArrayTypeOfPropertyInPSClass", resourceCulture); + } + } + /// /// Looks up a localized string similar to An expression was expected after '('.. /// @@ -1430,6 +1457,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to Failed to create an object of PowerShell class {0}.. + /// + internal static string InstantiatePSClassObjectFailed { + get { + return ResourceManager.GetString("InstantiatePSClassObjectFailed", resourceCulture); + } + } + /// /// Looks up a localized string similar to '{0}': Interface name expected.. /// @@ -1538,6 +1574,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to The hashtable supplied to the Desired State Configuration resource {0} is not valid. The key or value cannot be null or empty.. + /// + internal static string InvalidHashtable { + get { + return ResourceManager.GetString("InvalidHashtable", resourceCulture); + } + } + /// /// Looks up a localized string similar to The member '{0}' is not valid. Valid members are ///'{1}'.. @@ -1602,6 +1647,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to The username supplied to the Desired State Configuration resource {0} is not valid. The username cannot be null or empty.. + /// + internal static string InvalidPassword { + get { + return ResourceManager.GetString("InvalidPassword", resourceCulture); + } + } + /// /// Looks up a localized string similar to The PowerShell data file '{0}' is invalid since it cannot be evaluated into a Hashtable object.. /// @@ -1665,6 +1719,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to The username supplied to the Desired State Configuration resource {0} is not valid. The username cannot be null or empty.. + /// + internal static string InvalidUserName { + get { + return ResourceManager.GetString("InvalidUserName", resourceCulture); + } + } + /// /// Looks up a localized string similar to Expression is not allowed in a Using expression.. /// @@ -2925,6 +2988,15 @@ internal class ParserStrings { } } + /// + /// Looks up a localized string similar to Property {0} is not declared in PowerShell class {1}, but defined in its configuration instance.. + /// + internal static string PropertyNotDeclaredInPSClass { + get { + return ResourceManager.GetString("PropertyNotDeclaredInPSClass", resourceCulture); + } + } + /// /// Looks up a localized string similar to The property '{0}' cannot be found on this object. Verify that the property exists and can be set.. /// diff --git a/scripts/gen/SYS_AUTO/ParserStrings.resources b/scripts/gen/SYS_AUTO/ParserStrings.resources index c0d703f77c91016be0c87e99811acff3dcb526b7..7efbef9ebfe374931e2a06132779e97807e587ca 100644 GIT binary patch delta 6170 zcmb7H33yahvaT+;f)ZoE5VLk}lFq(#cRE|AvvoS1z0=vr3h5-Bq?67cEK0=yPi%fA4#rg!|oFb#sU> zP9OTiqW2Fiy6i^H-pg-#bqIHG^ojhv?`sj4dH53M4w4iTalkomxzk6i4*C2%-ZfqQx#EZ6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-{sWI2pebk2oe zmKn>ld~~u4Te8YE!-Y?>l8jX@UTNTR1?pxOGF<7#K|0dth{hh5yIyqRC709i;RPsb zbQa9nW=+jTMs|YHOJ^ip*sXBLj;XDN@fH}h+agFMpb zVq1X)c?I6Ot^myiHr-W#y9zS(bODYR6d99vz^05%NiXy@hT+wWwsg~E{`&yemR*$f{ zST!}EuFj@m4ft(cn3go)QeBYtHei3<97NRz>hT7Y*V~PF-aw=Ab)99#FBrSoA}geo z-fBeT2jWzHyzwlpG_-VhA*3NxZ&-xVh7hBhx62q*H1JB);BDMNtMIxNZ@fTj!I(95 zVU|v4MEOE)5Z+@ewl50C@rBX)_fcOMf)~YUViOiDa_RCW{3{>NHQ~&nOg-NO|HgEc zW-My7X;m}sXpGg(&3LgfNj(c z$)y`x5#1c6AGe~uIYhnNu)f)TU?~69T?YQ*ZvM9x8&#p9k{WjAfRLkOI*d`woy zeA*JL+6j+V0_{X{8TTdX#Ap`p#HYrAlBTaFHQ z;nlXxjL*Ax5><0=4oWG*4lwXP?mf$8b~h3H|KaNENR~@iH!|C8x}zHd?FGi~IW-hZ z+kNnJyPI)=R@`;VOSK2HJFM#4gOrYRP3*zij#zE(!R`*5(c3e+NB4GEaIM2b@9cs5 z61yJiLC%sWJ==q!C9yia7Y{FqFj9I)4~VNpKBHH6UD*r&&Qg7&7k!-}Q@s0l#*ab6 zQM<2EO*0<$EYApL`td-QQh2mn-;XD|Lo{Uo?{(X>W&oxhtDYM`aF0v92GQAL z*P8~hqbEf74&q=>k{%w!_p~k!BA_?Hm^MVEw)c6Vzt>$;hA`Y4t6f9b-&?GY4dKV$ z8Y5!q=x2LtUnq_@PSYEg;?6#&@d};Eqsu<+v*?6n7}xKZfMuLmgO);HYT~UQFT=|I zB%QS!d-|;!xB|!fBlNZv_czgcG + /// Looks up a localized string similar to Failed to find vmcompute.dll. The Hyper-V role may not be enabled on this machine.. + /// + internal static string CannotFindVmComputeDll { + get { + return ResourceManager.GetString("CannotFindVmComputeDll", resourceCulture); + } + } + /// /// Looks up a localized string similar to The call to Windows API GetStdHandle to get the Standard Error handle resulted in an error code: {0}.. /// @@ -538,6 +547,15 @@ internal class RemotingErrorIdStrings { } } + /// + /// Looks up a localized string similar to Could not find the toolkit, '{0}'. The toolkit must be a file named '{1}' within a 'Toolkits' directory in a module in the current module path.. + /// + internal static string CouldNotFindToolkit { + get { + return ResourceManager.GetString("CouldNotFindToolkit", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0} is not a valid value for the parameter {1}. The value must be greater than or equal to 0.. /// @@ -767,6 +785,15 @@ internal class RemotingErrorIdStrings { } } + /// + /// Looks up a localized string similar to Could not parse visible command defintion for '{0}'. The visible command definition must be a hashtable with the keys of 'Name' and 'Parameters'. The value of the 'Parameters' key must be a collection of hashtables with the keys 'Name', and optionally either 'ValidateSet' or 'ValidatePattern'.. + /// + internal static string DISCCommandModificationSyntax { + get { + return ResourceManager.GetString("DISCCommandModificationSyntax", resourceCulture); + } + } + /// /// Looks up a localized string similar to Company associated with this session configuration. /// @@ -956,6 +983,15 @@ internal class RemotingErrorIdStrings { } } + /// + /// Looks up a localized string similar to User roles (security groups), and the additional configuration settings that should be applied to them. + /// + internal static string DISCRoleDefinitionsComment { + get { + return ResourceManager.GetString("DISCRoleDefinitionsComment", resourceCulture); + } + } + /// /// Looks up a localized string similar to Version number of the schema used for this configuration file. /// @@ -974,6 +1010,15 @@ internal class RemotingErrorIdStrings { } } + /// + /// Looks up a localized string similar to Toolkits to apply to this session configuration. This toolkit must be defined as a session configuration file named after that toolkit within a 'Toolkits' directory in a module in the current module path.. + /// + internal static string DISCToolkitsToLoadComment { + get { + return ResourceManager.GetString("DISCToolkitsToLoadComment", resourceCulture); + } + } + /// /// Looks up a localized string similar to Specifies the transport options for this session configuration. /// @@ -1629,6 +1674,33 @@ internal class RemotingErrorIdStrings { } } + /// + /// Looks up a localized string similar to The 'Roles' entry must be a hashtable, but was a {0}.. + /// + internal static string InvalidRoleEntry { + get { + return ResourceManager.GetString("InvalidRoleEntry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key '{0}' is not valid in a toolkit or role definition.. + /// + internal static string InvalidRoleToolkitKey { + get { + return ResourceManager.GetString("InvalidRoleToolkitKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not convert the value of the '{0}' role entry to a hashtable. The 'Roles' entry must be a hashtable with group names for keys, where the value associated with each key is another hashtable of session configuration properties for that role.. + /// + internal static string InvalidRoleValue { + get { + return ResourceManager.GetString("InvalidRoleValue", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0} is not a valid schema value. Valid values are "http" and "https".. /// @@ -3053,6 +3125,15 @@ internal class RemotingErrorIdStrings { } } + /// + /// Looks up a localized string similar to Failed to create an instance of RemoteSessionHyperVSocketServer.. + /// + internal static string RemoteSessionHyperVSocketServerConstructorFailure { + get { + return ResourceManager.GetString("RemoteSessionHyperVSocketServerConstructorFailure", resourceCulture); + } + } + /// /// Looks up a localized string similar to Remote transport error: {0}. /// @@ -3837,6 +3918,15 @@ internal class RemotingErrorIdStrings { } } + /// + /// Looks up a localized string similar to WSMan Initialization failed with error code: {0}.. + /// + internal static string WSManInitFailed { + get { + return ResourceManager.GetString("WSManInitFailed", resourceCulture); + } + } + /// /// Looks up a localized string similar to The maximum number of WS-Man URI redirections to allow while connecting to a remote computer. /// diff --git a/scripts/gen/SYS_AUTO/RemotingErrorIdStrings.resources b/scripts/gen/SYS_AUTO/RemotingErrorIdStrings.resources index 7b771f8a5ad583b68e91c923db4e95fa57879e73..f3a113e04ac1b72a6186e7e803699fe47e4d7c54 100644 GIT binary patch delta 7701 zcmbVQ3wTu3wcfMH2@pbvkjLbGGI>lUnLH<9GI@u*$U7t=6zXT; zFMRJGi(M?lJ%K_j4H6=%Lx}5Bgm`7X5T!UlAp#JL1#*s6h_^F^*a-*w^+Fu& z6yi{w5Y9*;HsuSk3JWbpLID9ne4Q#p0TQz#kZ;3)*7yVo?5-E$j%*>$ri}^V zLR4Sm39%YKUk#$iK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--- a/src/monad +++ b/src/monad @@ -1 +1 @@ -Subproject commit 2793b76e2d48f012a82b8e9106b9e9f496d3b785 +Subproject commit 44427ec1f38f443a8b90a48e50a4d40beed0fa05 From 93199735d83449ef50303fb580bdb56625e8b140 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Thu, 27 Aug 2015 16:16:13 -0700 Subject: [PATCH 14/15] added unit test for getting the machine name from the p/invoke --- src/ps_test/test_CorePsPlatform.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/ps_test/test_CorePsPlatform.cs b/src/ps_test/test_CorePsPlatform.cs index 99a3d8f3f..0f937df3b 100644 --- a/src/ps_test/test_CorePsPlatform.cs +++ b/src/ps_test/test_CorePsPlatform.cs @@ -65,5 +65,29 @@ namespace PSTests Assert.Equal(username, Platform.NonWindowsGetUserName()); } } + + [Fact] + public static void TestGetMachineName() + { + var startInfo = new ProcessStartInfo + { + FileName = @"/usr/hostname", + RedirectStandardOutput = true, + UseShellExecute = false + }; + using (Process process = Process.Start(startInfo)) + { + // Get output of call to hostname without trailing newline + string hostname = process.StandardOutput.ReadToEnd().Trim(); + process.WaitForExit(); + + // The process should return an exit code of 0 on success + Assert.Equal(0, process.ExitCode); + // It should be the same as what our platform code returns + Assert.Equal(hostname, Platform.NonWindowsGetMachineName()); + } + + + } } } From 6a88fe52aa81709656b40e18173c09e0271aa929 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 28 Aug 2015 14:45:56 -0700 Subject: [PATCH 15/15] Fix GetComputerName xUnit test and repin monad --- src/monad | 2 +- src/ps_test/test_CorePsPlatform.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/monad b/src/monad index 44427ec1f..8e014f44d 160000 --- a/src/monad +++ b/src/monad @@ -1 +1 @@ -Subproject commit 44427ec1f38f443a8b90a48e50a4d40beed0fa05 +Subproject commit 8e014f44d72765f086fe516e870602d5a476076e diff --git a/src/ps_test/test_CorePsPlatform.cs b/src/ps_test/test_CorePsPlatform.cs index 0f937df3b..57e58bc32 100644 --- a/src/ps_test/test_CorePsPlatform.cs +++ b/src/ps_test/test_CorePsPlatform.cs @@ -71,7 +71,8 @@ namespace PSTests { var startInfo = new ProcessStartInfo { - FileName = @"/usr/hostname", + FileName = @"/usr/bin/env", + Arguments = "hostname", RedirectStandardOutput = true, UseShellExecute = false };