ComputerManagementDsc icon indicating copy to clipboard operation
ComputerManagementDsc copied to clipboard

xComputer Unit Tests fail If Run on Domain Joined Machine

Open PlagueHO opened this issue 7 years ago • 0 comments

Details of the scenario you tried and the problem that is occurring: When executing the unit tests for xComputer they fail:

    Context MSFT_xComputer\Get-TargetResource
VERBOSE: Getting computer state for 'GR059600'.
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_ComputerSystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_ComputerSystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
      [-] should not throw 132ms
        Expected: the expression not to throw an exception. Message was {Exception calling "FindOne" with "0" argument(s
): "The specified domain either does not exist or could not be contacted.
        "}
            from C:\Users\si557856\Source\github\xComputerManagement\Modules\xComputerManagement\DSCResources\MSFT_xComp
uter\MSFT_xComputer.psm1:110 char:28
            +         CurrentOU        = Get-ComputerOU
            +                            ~~~~~~~~~~~~~~
        451:                     } | Should -Not -Throw
        at Invoke-Assertion, C:\Program Files\WindowsPowerShell\Modules\Pester\4.1.1\Functions\Assertions\Should.ps1: li
ne 209
        at <ScriptBlock>, C:\Users\si557856\Source\github\xComputerManagement\Tests\Unit\MSFT_xComputer.Tests.ps1: line

The DSC configuration that is using the resource (as detailed as possible): N/A

Version of the Operating System and PowerShell the DSC Target Node is running: Windows 10 AD domain joined

Version of the DSC module you're using, or 'dev' if you're using current dev branch: dev

PlagueHO avatar Mar 06 '18 18:03 PlagueHO