Skip to content

Add CI HTTP tests for Windows#731

Merged
jviotti merged 4 commits intomainfrom
windows-ci-tests
Apr 23, 2026
Merged

Add CI HTTP tests for Windows#731
jviotti merged 4 commits intomainfrom
windows-ci-tests

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Apr 23, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 23, 2026

🤖 Augment PR Summary

Summary: This PR adds Windows coverage for the existing CI HTTP integration tests by introducing PowerShell-based test runners.

Changes:

  • Added a new CMake helper macro (add_jsonschema_test_windows_ci) to register CI-only tests when building on Windows (JSONSCHEMA_TESTS_CI + WIN32).
  • Registered Windows CI variants of the HTTP-focused tests for bundle, validate, and install.
  • Implemented PowerShell test scripts mirroring the existing Unix shell scripts for:
    • HTTP success cases (bundle/validate/install)
    • HTTP failure cases (non-200 fetches and non-schema documents)
  • Scripts create isolated temp workspaces, execute jsonschema_cli, and assert exit codes plus exact stdout/stderr content.

Technical Notes: The new tests rely on external HTTPS endpoints under schemas.sourcemeta.com and use strict output matching (with newline normalization) to ensure consistent CLI diagnostics on Windows.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread test/CMakeLists.txt Outdated
macro(add_jsonschema_test_windows_ci name)
if(JSONSCHEMA_TESTS_CI AND WIN32)
add_test(NAME JSONSchema.ci.${name} COMMAND
powershell -ExecutionPolicy Bypass -File
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

test/CMakeLists.txt:20 Running powershell without disabling profiles/non-interactive mode can pick up environment/profile side-effects, which can make these CI tests less deterministic on some Windows agents.

Severity: low

Generating Fix in Augment link...

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread test/ci/pass_install_http.ps1 Outdated
}

$resolvedTmp = (Resolve-Path $TMP).Path.TrimEnd('\')
$output = $result.Stdout + $result.Stderr
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

test/ci/pass_install_http.ps1:60 Building $output via $result.Stdout + $result.Stderr doesn’t preserve the real ordering if the CLI writes to both streams, so the output assertion can become flaky even when the CLI behavior is correct. (The Unix equivalent captures combined output in-order.)

Severity: medium

Other Locations
  • test/ci/pass_install_add_http.ps1:52

Generating Fix in Augment link...

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 9 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="test/ci/pass_bundle_http.ps1">

<violation number="1" location="test/ci/pass_bundle_http.ps1:9">
P3: Use a case-sensitive comparison here so the JSON diff fails on casing changes as well.</violation>
</file>

<file name="test/ci/pass_install_add_http.ps1">

<violation number="1" location="test/ci/pass_install_add_http.ps1:75">
P2: Use a 5.1-compatible `Join-Path` form here; the third positional path segment is not accepted by Windows PowerShell.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread test/ci/pass_install_add_http.ps1 Outdated
Comment thread test/ci/pass_bundle_http.ps1 Outdated
jviotti added 3 commits April 23, 2026 12:53
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 3f4f093 into main Apr 23, 2026
14 checks passed
@jviotti jviotti deleted the windows-ci-tests branch April 23, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant