Skip to content

xRemoteFile always returns false in test #409

Closed
@shurick81

Description

@shurick81

As a devops, I expect to be able to test if the system is in desired state, including xRemoteFile resources. Here is an example of the resource I am applying:

        xRemoteFile SQLMediaArchive
        {
            Uri             = "http://$env:PACKER_HTTP_ADDR/SQLServer2014SP1.zip"
            DestinationPath = "C:\Install\SQLServer2014SP1.zip"
        }

First, I run Start-DscConfiguration and the file is downloaded successfully. Then I need to test that configuration is in desired state, so I run Test-DscConfiguration and I get False:

VERBOSE: An LCM method call arrived from computer WIN-SLU589M70V9 with user sid
 S-1-5-21-3913156103-666311135-156080423-500.
VERBOSE: [WIN-SLU589M70V9]: LCM:  [ Start  Compare  ]
VERBOSE: [WIN-SLU589M70V9]: LCM:  [ Start  Resource ]
[[xRemoteFile]SQLMediaArchive]
VERBOSE: [WIN-SLU589M70V9]: LCM:  [ Start  Test     ]
[[xRemoteFile]SQLMediaArchive]
VERBOSE: [WIN-SLU589M70V9]:
[[xRemoteFile]SQLMediaArchive] DestinationPath
'C:\Install\SQLServer2014SP1.zip' is existing file on the machine.
VERBOSE: [WIN-SLU589M70V9]:
[[xRemoteFile]SQLMediaArchive] Looking for cache path
'C:\ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\MSF
T_xRemoteFile\1645172953'.
VERBOSE: [WIN-SLU589M70V9]:
[[xRemoteFile]SQLMediaArchive] No cache found for DestinationPath
'C:\Install\SQLServer2014SP1.zip' and Uri
'http://10.0.2.2:8328/SQLServer2014SP1.zip' CacheKey '1645172953'.
VERBOSE: [WIN-SLU589M70V9]:
[[xRemoteFile]SQLMediaArchive] Cache is empty or it doesn't reflect current
state. File will be downloaded.
VERBOSE: [WIN-SLU589M70V9]: LCM:  [ End    Test     ]
[[xRemoteFile]SQLMediaArchive] **False** in 0.1090 seconds.
VERBOSE: [WIN-SLU589M70V9]: LCM:  [ End    Resource ]
[[xRemoteFile]SQLMediaArchive]
VERBOSE: [WIN-SLU589M70V9]: LCM:  [ Start  Resource ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThe issue is related to documentation only.in progressThe issue is being actively worked on by someone.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions