Title: Some tests do not perform proper Module cleanup · Issue #11058 · PowerShell/PowerShell · GitHub
Open Graph Title: Some tests do not perform proper Module cleanup · Issue #11058 · PowerShell/PowerShell
X Title: Some tests do not perform proper Module cleanup · Issue #11058 · PowerShell/PowerShell
Description: In CI we run several different test suites in the same PS runspace. Some tests do Not cleanup after themselves, leaving loaded modules they were working with. Sometimes this produces unexpected results and breaks subsequent tests. Steps ...
Open Graph Description: In CI we run several different test suites in the same PS runspace. Some tests do Not cleanup after themselves, leaving loaded modules they were working with. Sometimes this produces unexpected res...
X Description: In CI we run several different test suites in the same PS runspace. Some tests do Not cleanup after themselves, leaving loaded modules they were working with. Sometimes this produces unexpected res...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11058
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Some tests do not perform proper Module cleanup","articleBody":"In CI we run several different test suites in the same PS runspace.\r\nSome tests do Not cleanup after themselves, leaving loaded modules they were working with.\r\nSometimes this produces unexpected results and breaks subsequent tests.\r\n\r\n# Steps to reproduce\r\n\r\n1) add `get-module` in the beginning of each test file\r\n2) run tests, notice any non-standard modules\r\n3) find tests, where those modules are used, and update them with a proper cleanup\r\n\r\n# Actual behavior\r\nhere is example output listing modules that are loaded in the beginning of an unrelated test file\r\n```\r\nVERBOSE: Listing all loaded modules:\r\ncertificateCommon - \r\nCimCmdlets\r\nHelpersCommon\r\nHelpersRemoting\r\nHelpersSecurity\r\nImportTrustedManifestWithCallOperator_System32\r\nImportTrustedManifestWithCmdletExport_System32\r\nImportTrustedManifestWithDotSourceModAndFnExport_System32\r\nImportTrustedManifestWithExportFn_System32\r\nImportTrustedManifestWithNestedModsAndFnExport_System32\r\nImportTrustedManifestWithNestedModsAndNoExtNoFnExport_System32\r\nImportTrustedManifestWithNestedModsAndNoFnExport_System32\r\nImportTrustedManifestWithNoFnExport_System32\r\nImportTrustedManifestWithTwoMods_System32\r\nImportTrustedManifestWithWildcardFnExport1_System32\r\nImportTrustedManifestWithWildcardModFnExport_System32\r\nImportTrustedManifestWithWildcardNameFnExport_System32\r\nImportTrustedModuleForTest_System32\r\nImportTrustedModuleTest_System32\r\nImportTrustedModuleWithFnExport_System32\r\nImportTrustedModuleWithNoFnExport_System32\r\nImportTrustedModuleWithWildcardFnExport_System32\r\nImportUntrustedManifestWithFnExport\r\nImportUnTrustedManifestWithFnExport_System32\r\nImportUntrustedManifestWithNoFnExport\r\nImportUnTrustedModuleWithFnExport\r\nImportUnTrustedModuleWithNoFnExport\r\nMicrosoft.PowerShell.Archive\r\nMicrosoft.PowerShell.Management\r\nMicrosoft.PowerShell.Security\r\nMicrosoft.PowerShell.Utility\r\nMicrosoft.WSMan.Management\r\nModuleDotSourceNestedExport_System32\r\nModuleDotSourceNoExportE_System32\r\nModuleDotSourceNoWildcard_System32\r\nModuleDotSourceWildcard_System32\r\nModuleDotSourceWildCardM_System32\r\nModuleWithUsing_System32\r\nPackageManagement\r\nPester\r\npkiTrue\r\nPSDiagnostics\r\nPSSysLog\r\nTestImport\r\nThreadJob\r\nTrustedImportModule_System32\r\nTrustedParentModule_System32\r\nUntrustedModuleScriptBlockTest\r\nUntrustedScriptFoo\r\n```\r\n","author":{"url":"https://github.com/anmenaga","@type":"Person","name":"anmenaga"},"datePublished":"2019-11-13T02:23:41Z","url":"https://github.com/PowerShell/PowerShell/issues/11058"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ac73612f-6b4f-f09f-6fde-fcd77c486edf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E474:3257C8:1EA0C5:2979B3:6AFD4FFF |
| html-safe-nonce | c619b33861e2606530ad1a8f8d29de25f2763bd39bf8cbe1574b821cc30f432c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDc0OjMyNTdDODoxRUEwQzU6Mjk3OUIzOjZBRkQ0RkZGIiwidmlzaXRvcl9pZCI6IjM2MTU4MzUwMTI5NzgyNjYxMTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1f640163f29539df6513d47a47b68a619bf9da855dfb273c703df58a26618502 |
| hovercard-subject-tag | issue:521916701 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/11058/issue_layout |
| twitter:image | https://opengraph.githubassets.com/03c88770e5321feab53349ab964a9a54f78708495215a6a98a0e39e406f84452/PowerShell/PowerShell/issues/11058 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/03c88770e5321feab53349ab964a9a54f78708495215a6a98a0e39e406f84452/PowerShell/PowerShell/issues/11058 |
| og:image:alt | In CI we run several different test suites in the same PS runspace. Some tests do Not cleanup after themselves, leaving loaded modules they were working with. Sometimes this produces unexpected res... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anmenaga |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width