octopus-serverspec-extensions 0.13.4 → 0.13.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e22b8d434cb793ebc4f82f0824df31b239e109f
|
4
|
+
data.tar.gz: 9cc65067d6cccb05b71b6508b9cbfa92cb32fb7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61860940e0f6959174a64240dfb6cee54d9cd9ce6c972f10499cf31b4749c9437d91f9bef69534f6a76080edeb4de8d3e6863e5052013ac3dc9e29ade1a3b0f1
|
7
|
+
data.tar.gz: ca6e1ec55aab6f065a9d99a609f37f937a7dac14a54072c5e2c85708ec0c325f93760298b4a49cdaa5a553f13677ef2384ddb4449d8caaaa99be07aa27395d52
|
@@ -9,12 +9,12 @@ module Serverspec::Type
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def able_to_get_dsc_configuration?
|
12
|
-
command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; try { Get-DSCConfiguration -ErrorAction Stop; write-output "Get-DSCConfiguration succeeded"; $true } catch { write-output "Get-DSCConfiguration failed"; write-output $_; $false }')
|
12
|
+
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 { Get-DSCConfiguration -ErrorAction Stop; write-output "Get-DSCConfiguration succeeded"; $true } catch { write-output "Get-DSCConfiguration failed"; write-output $_; $false }')
|
13
13
|
command_result.stdout.gsub(/\n/, '').match /Get-DSCConfiguration succeeded/
|
14
14
|
end
|
15
15
|
|
16
16
|
def applied_dsc_configuration_successfully?
|
17
|
-
command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; 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 }')
|
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
|
|