使用 Compare-Object 进行纠缠测试在天蓝色管道中失败
我正在比较两个看起来完全一样的文件,当我在本地测试时,没有问题,但是当我在Azure Pipeline中运行测试时,测试失败并说它看起来不一样。
我不知道为什么或如何进行调试?
Context "Azure Hierarchy" {
It "Article is updated" {
$FileContent = Get-Content $AzureHierarchyDocsFilePath
Compare-Object -ReferenceObject $AzureHierarchy -DifferenceObject $FileContent -CaseSensitive |
Should -BeNullOrEmpty
}
}
I am comparing two files which looks exactly alike, and when I test locally there is no problem, but when i run the test in my azure pipeline, the test fails and says it does not look alike.
I have no idea why or what to do for debugging?
Context "Azure Hierarchy" {
It "Article is updated" {
$FileContent = Get-Content $AzureHierarchyDocsFilePath
Compare-Object -ReferenceObject $AzureHierarchy -DifferenceObject $FileContent -CaseSensitive |
Should -BeNullOrEmpty
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论