Skip to content

BuildModule.tests.ps1 Issues #1653

Closed
@clcaldwell

Description

@clcaldwell

Issue

BuildModule.tests has several issues.

1. There is an invalid character (U+FEFF) introduced into an xml file that make it unable to be parsed ( PSInvalidCastException: Cannot convert value "System.Object[]" to type "System.Xml.XmlDocument" ), so some of the tests are invalid and fail:

<?xml version="1.0" encoding="utf-8" standalone="no"?>

2. Once the first issue is corrected, the test fails here:
It "Get-TestFailures finds 1 failure" {
$failures.Count | Should -Be 1
}

3. This whole test file is never executed. It is not run when ./build.ps1 -Tests is executed locally (the other tested locations are hardcoded and this file is not in one of the referenced paths). I also looked through several appveyor logs + Azure CI logs, and as far as I can tell the tests in this file are never executed in any of the environments. Since one of these tests is failing, it should be pretty easy to find.

Expected behavior

BuildModules.tests.ps1 should be executed along with all of the other tests files, and the tests in this file should pass.

Environment

Issue 1 and Issue 2 Both errors occur in Windows Powershell 5.1 - but not in Powershell 7.1.2.

Issue 3 Is applicable to all environments, as far as I can see.

$PSVersionTable
PSVersion 5.1.19041.868
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.868
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions