Fix Windows task and certificate collector reliability
This commit is contained in:
@@ -8,6 +8,12 @@ import unittest
|
||||
class PowerShellTests(unittest.TestCase):
|
||||
def test_native_ast_and_synthetic_collectors(self):
|
||||
executable = shutil.which('powershell.exe') if os.name == 'nt' else shutil.which('pwsh')
|
||||
self.run_collectors(executable)
|
||||
|
||||
def test_powershell_7_collectors(self):
|
||||
self.run_collectors(shutil.which('pwsh'))
|
||||
|
||||
def run_collectors(self, executable):
|
||||
if not executable:
|
||||
self.skipTest('No PowerShell runtime available; native AST/collector tests require Windows PowerShell 5.1 or pwsh.')
|
||||
script=Path('tests/powershell/Test-Collectors.ps1').resolve()
|
||||
|
||||
Reference in New Issue
Block a user