octopus-serverspec-extensions 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: accd636bf0a088a23dda4d428fd575840704f3a1068eab896f8817d6890ca9d7
|
4
|
+
data.tar.gz: 57e70a349babc455e82194922c2b2b89e0e6cae3cfacfb09b89eb5ac961505f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c620edea5319dd1dcba22c44b3d8c1e2befa0705be7cc994dc0f7400f064724172bd82e1478a0bd02785b6ecbcc2f54c9323669057bdcd2f8e439275d1e66d73
|
7
|
+
data.tar.gz: '0775348a6ed1c63525ecd2b7b6a64e9642dcbe3b9dac2ef8ce7069920fa1bf0e8ece5b5533c52420f9c1ca30e783e19f032c3ab4a2ea090f471d2e77b1774a4f'
|
@@ -13,12 +13,12 @@ module Serverspec::Type
|
|
13
13
|
command_result.stdout.gsub(/\n/, '').match /Get-DSCConfiguration succeeded/
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def has_test_dsc_configuration_return_true?
|
17
17
|
command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; $state = ""; do { $state = (Get-DscLocalConfigurationManager).LCMState; write-host "LCM state is $state"; Start-Sleep -Seconds 2; } while ($state -ne "Idle"); try { if (-not (Test-DSCConfiguration -ErrorAction Stop)) { write-output "Test-DSCConfiguration returned false"; exit 1 } write-output "Test-DSCConfiguration succeeded"; exit 0 } catch { write-output "Test-DSCConfiguration failed"; write-output $_; exit 2 }')
|
18
18
|
command_result.stdout.gsub(/\n/, '').match /Test-DSCConfiguration succeeded/
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def has_dsc_configuration_status_of_success?
|
22
22
|
command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; try { $statuses = @(Get-DSCConfigurationStatus -ErrorAction Stop -All); $status = $statuses[0].Status; write-host "Get-DSCConfigurationStatus is \'$status\'"; if ($status -eq "Success") { exit 0 } else { exit 1 } } catch { write-output "Get-DSCConfigurationStatus failed"; write-output $_; exit 2; }')
|
23
23
|
command_result.stdout.gsub(/\n/, '').match /Get-DSCConfigurationStatus is 'Success'/
|
24
24
|
end
|