extends "res://tests/test_case.gd" const AgonesSDKScript = preload("res://scripts/agones_sdk.gd") func test_sdk_requires_loopback_sidecar_url() -> void: var sdk = AgonesSDKScript.new() assert_true(not sdk.configure_for_testing("https://agones.example"), "remote sidecar URL is rejected") assert_true(not sdk.is_available(), "rejected sidecar is unavailable") assert_true(sdk.configure_for_testing("http://127.0.0.1:9358"), "loopback sidecar URL is accepted") assert_true(sdk.is_available(), "accepted sidecar is available") sdk.queue_free() func test_annotation_validation_rejects_header_injection_and_oversized_values() -> void: assert_true(AgonesSDKScript.annotation_is_valid("match", "result"), "ordinary annotation is accepted") assert_true(not AgonesSDKScript.annotation_is_valid("bad\nkey", "value"), "annotation key newline is rejected") assert_true(not AgonesSDKScript.annotation_is_valid("key", "bad\rvalue"), "annotation value newline is rejected") assert_true(not AgonesSDKScript.annotation_is_valid("key", "x".repeat(4097)), "oversized annotation is rejected")