Issue #250: testReadRemoteKeyOnHost is skipped when remote registry service is not started
--- a/RegressionTests__Win32OperatingSystemTest.st Tue Dec 11 16:44:54 2018 +0100
+++ b/RegressionTests__Win32OperatingSystemTest.st Wed Jan 16 14:37:47 2019 +0100
@@ -547,13 +547,18 @@
"Reading remote registry via remoteKeyOnHost:
Note: a key must be a predefined key for more see:
https://docs.microsoft.com/en-us/windows/desktop/SysInfo/predefined-keys"
+ | testingRegistryPath remoteRegistry readData |
- | testingRegistryPath remoteRegistry readData |
-
"/ HKEY_CURRENT_USER is one of the predefined keys
- testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'.
- "/ testing done on localhost
- remoteRegistry := testingRegistryPath remoteKeyOnHost: 'localhost'.
+ testingRegistryPath := Win32OperatingSystem registryEntry key: 'HKEY_CURRENT_USER'.
+
+ "Skip testing if the remote registry is unreachable. With localhost this can happen when
+ the service RemoteRegistry, the service name in Windows 10, is not started."
+ [ remoteRegistry := testingRegistryPath remoteKeyOnHost: 'localhost' ] on: OsError do: [ :ex | "/ errorCode => `ex parameter parameter`
+ self skipIf: ex parameter parameter = '53' description: 'ERROR_BAD_NETPATH, 53 (0x35) - The network path was not found.'
+ ].
+
+ "/ testing done on localhost
readData := remoteRegistry subKeys.
readData := readData copy collect: [ :subEntry | (subEntry path copyAfterLast: $\) asLowercase ].
@@ -567,6 +572,7 @@
"
"Created: / 05-12-2018 / 12:41:06 / svestkap"
+ "Modified (format): / 16-01-2019 / 14:20:37 / svestkap"
!
testReadSubKeyNamesAndClassesDo_MaxPath