Skip to content

BuildModule.tests.ps1 Issues #1653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
clcaldwell opened this issue Mar 23, 2021 · 0 comments · Fixed by #1654
Closed

BuildModule.tests.ps1 Issues #1653

clcaldwell opened this issue Mar 23, 2021 · 0 comments · Fixed by #1654
Assignees

Comments

@clcaldwell
Copy link
Contributor

clcaldwell commented Mar 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants