@@ -7,7 +7,7 @@ module Conformance
77 class ServerRunnerTest < ActiveSupport ::TestCase
88 EXPECTED_FAILURES_YML = File . expand_path ( "../../conformance/expected_failures.yml" , __dir__ )
99
10- test "build_command runs the active suite by default" do
10+ test "build_command runs the full suite by default" do
1111 command = ServerRunner . new . send ( :build_command )
1212
1313 assert_equal (
@@ -18,6 +18,92 @@ class ServerRunnerTest < ActiveSupport::TestCase
1818 "server" ,
1919 "--url" ,
2020 "http://localhost:#{ Server ::DEFAULT_PORT } /mcp" ,
21+ "--suite" ,
22+ "all" ,
23+ "--expected-failures" ,
24+ EXPECTED_FAILURES_YML ,
25+ ] ,
26+ command ,
27+ )
28+ end
29+
30+ test "build_command keeps the single scenario selection" do
31+ command = ServerRunner . new ( scenario : "ping" ) . send ( :build_command )
32+
33+ assert_equal (
34+ [
35+ "npx" ,
36+ "--yes" ,
37+ "@modelcontextprotocol/conformance@alpha" ,
38+ "server" ,
39+ "--url" ,
40+ "http://localhost:#{ Server ::DEFAULT_PORT } /mcp" ,
41+ "--scenario" ,
42+ "ping" ,
43+ "--expected-failures" ,
44+ EXPECTED_FAILURES_YML ,
45+ ] ,
46+ command ,
47+ )
48+ end
49+
50+ test "build_command pins the full suite to a spec version" do
51+ command = ServerRunner . new ( spec_version : "2025-11-25" ) . send ( :build_command )
52+
53+ assert_equal (
54+ [
55+ "npx" ,
56+ "--yes" ,
57+ "@modelcontextprotocol/conformance@alpha" ,
58+ "server" ,
59+ "--url" ,
60+ "http://localhost:#{ Server ::DEFAULT_PORT } /mcp" ,
61+ "--suite" ,
62+ "all" ,
63+ "--spec-version" ,
64+ "2025-11-25" ,
65+ "--expected-failures" ,
66+ EXPECTED_FAILURES_YML ,
67+ ] ,
68+ command ,
69+ )
70+ end
71+
72+ test "build_command pins a single scenario to a spec version" do
73+ command = ServerRunner . new ( scenario : "ping" , spec_version : "2025-11-25" ) . send ( :build_command )
74+
75+ assert_equal (
76+ [
77+ "npx" ,
78+ "--yes" ,
79+ "@modelcontextprotocol/conformance@alpha" ,
80+ "server" ,
81+ "--url" ,
82+ "http://localhost:#{ Server ::DEFAULT_PORT } /mcp" ,
83+ "--scenario" ,
84+ "ping" ,
85+ "--spec-version" ,
86+ "2025-11-25" ,
87+ "--expected-failures" ,
88+ EXPECTED_FAILURES_YML ,
89+ ] ,
90+ command ,
91+ )
92+ end
93+
94+ test "build_command lets a requirement set replace a scenario selection" do
95+ command = ServerRunner . new ( requirements : "2026-07-28" , scenario : "ping" ) . send ( :build_command )
96+
97+ assert_equal (
98+ [
99+ "npx" ,
100+ "--yes" ,
101+ "@modelcontextprotocol/conformance@alpha" ,
102+ "server" ,
103+ "--url" ,
104+ "http://localhost:#{ Server ::DEFAULT_PORT } /mcp" ,
105+ "--requirements" ,
106+ "2026-07-28" ,
21107 "--expected-failures" ,
22108 EXPECTED_FAILURES_YML ,
23109 ] ,
0 commit comments