Skip to content

Commit

Permalink
terminal_services: Fix "The operation completed successfully." error
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Aug 2, 2024
1 parent 5d2d759 commit 689b3cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ jobs:
- name: e2e Test
run: make e2e-test

- name: Show logs
if: always()
run: |-
cat windows_exporter.log
cat windows_exporter_error.log
promtool:
runs-on: windows-2019
steps:
Expand Down
11 changes: 10 additions & 1 deletion tools/end-to-end-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@ for ($i=1; $i -le 5; $i++) {
Write-Host "Waiting for exporter to start"
}

$response = Invoke-WebRequest -UseBasicParsing -URI http://127.0.0.1:9182/metrics
try {
$response = Invoke-WebRequest -UseBasicParsing -URI http://127.0.0.1:9182/metrics
} catch {
Write-Host "STDOUT"
Get-Content "$($temp_dir)/windows_exporter.log"
Write-Host "STDERR"
Get-Content "$($temp_dir)/windows_exporter_error.log"

throw $_
}
# Response output must be split and saved as UTF-8.
$response.content -split "[`r`n]"| Select-String -NotMatch $skip_re | Set-Content -Encoding utf8 "$($temp_dir)/e2e-output.txt"
Stop-Process -Id $exporter_proc.Id
Expand Down

0 comments on commit 689b3cc

Please sign in to comment.