GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Suppress the expected errors from Select-Xml tests by daxian-dbw · Pull Request #5591 · PowerShell/PowerShell

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Nov 30, 2017

Copy link
Copy Markdown
Member

Suppress expected errors from Select-Xml tests to reduce noises:

Describing XML cmdlets
   Context Select-XML
++++++
Select-XML : The file 'xmltestfile' cannot be read: Could not find file 'C:\projects\powershell-f975h\xmltestfile'.
At C:\projects\powershell-f975h\test\powershell\Modules\Microsoft.PowerShell.Utility\xml.tests.ps1:68 char:17
+                 Select-XML @params "Root" -ErrorVariable err
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (xmltestfile:String) [Select-Xml], ArgumentException
+ FullyQualifiedErrorId : ProcessingFile,Microsoft.PowerShell.Commands.SelectXmlCommand
 
+
Select-XML : Cannot open the file because the current provider (Microsoft.PowerShell.Core\Environment) cannot open files.
At C:\projects\powershell-f975h\test\powershell\Modules\Microsoft.PowerShell.Utility\xml.tests.ps1:68 char:17
+                 Select-XML @params "Root" -ErrorVariable err
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (env:xmltestfile:String) [Select-Xml], InvalidOperationException
+ FullyQualifiedErrorId : ProcessingFile,Microsoft.PowerShell.Commands.SelectXmlCommand
 
...

After the fix:

Describing XML cmdlets
   Context Select-XML
    [+] literalpath with relative paths 591ms
    [+] literalpath with absolute paths 82ms
    [+] literalpath with path with dots 11ms
    [+] path with relative paths 11ms
    [+] path with absolute paths 11ms
    [+] path with path with dots 13ms
    [+] Verifies a non filesystem path using literalPath should fail 46ms
    [+] Verifies a non filesystem path using path should fail 9ms
    [+] Invalid xml file 72ms
    [+] -xml works with inputstream 46ms
    [+] Returns error for invalid xmlnamespace 16ms
    [+] Returns error for invalid content 18ms
    [+] ToString() works correctly on nested node 15ms
    [+] ToString() works correctly with file 64ms
Tests completed in 1.01s
Passed: 14 Failed: 0 Skipped: 0 Pending: 0

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daxian-dbw Dongbo Wang (daxian-dbw) assigned Aditya Patwardhan (adityapatwardhan) Nov 30, 2017
@daxian-dbw
Dongbo Wang (daxian-dbw) requested a review from Aditya Patwardhan (adityapatwardhan) November 30, 2017 18:35
@daxian-dbw
[Feature] Supress the expected errors from Select-Xml tests
4ab439e
@daxian-dbw
Dongbo Wang (daxian-dbw) force-pushed the supressXmlTestErrors branch from dee0f6b to 4ab439e Compare November 30, 2017 18:36
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Nov 30, 2017
View reviewed changes
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Nov 30, 2017

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) Can you have a look at the failures?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daxian-dbw

Dongbo Wang (daxian-dbw) commented Nov 30, 2017

Copy link
Copy Markdown
Member Author

All failures are know issues:
Linux CI failure --> #5567
macOS CI failure --> #5590

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) approved these changes Dec 3, 2017
View reviewed changes
Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/xml.tests.ps1
Push-Location "$fileName\.."
"<Root>" | out-file -LiteralPath $fileName
" <Node Attribute='blah' />" | out-file -LiteralPath $fileName -Append
"</Root>" | out-file -LiteralPath $fileName -Append

@iSazonov Ilya (iSazonov) Dec 3, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daxian-dbw Dongbo Wang (daxian-dbw) Dec 4, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to be tabs, and now is changed to spaces as in rest of the file.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Dec 4, 2017

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) Restarted Travis-CI.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daxian-dbw

Dongbo Wang (daxian-dbw) commented Dec 4, 2017

Copy link
Copy Markdown
Member Author

Aditya Patwardhan (@adityapatwardhan) CI builds have passed, can you please merge this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 3469d4b into PowerShell:master Dec 4, 2017
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the supressXmlTestErrors branch December 4, 2017 22:44
@TravisEz13 Travis Plunk (TravisEz13) added this to the 6.0.0-RC.2 milestone Dec 5, 2017
Travis Plunk (TravisEz13) pushed a commit to TravisEz13/PowerShell that referenced this pull request Dec 5, 2017
@daxian-dbw @TravisEz13
[Feature] Supress the expected errors from Select-Xml tests (PowerShe…
c25cb72
…ll#5591)
@TravisEz13 Travis Plunk (TravisEz13) mentioned this pull request Dec 5, 2017
Merge changes from master to 6.0.0-rc.2 #5626
Merged
Travis Plunk (TravisEz13) pushed a commit that referenced this pull request Dec 5, 2017
@daxian-dbw @TravisEz13
[Feature] Supress the expected errors from Select-Xml tests (#5591)
f7ac342
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@daxian-dbw @adityapatwardhan
[Feature] Supress the expected errors from Select-Xml tests (PowerShe…
7f22364
…ll#5591)
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@daxian-dbw @TravisEz13
[Feature] Supress the expected errors from Select-Xml tests (PowerShe…
95324cc
…ll#5591)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) adityapatwardhan approved these changes
@iSazonov Ilya (iSazonov) iSazonov approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

Labels

None yet

Projects

None yet

Milestone

6.0.0-RC.2

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@daxian-dbw @adityapatwardhan @iSazonov @TravisEz13
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.