Skip to content

Commit 0fd59c2

Browse files
committed
Exclude UserProvidedAllowedHosts from Verify snapshots
The new UserProvidedAllowedHosts helper flag is not serialized to the config file, mirroring UserProvidedPath. Ignore it in the Cli.Tests and Service.Tests Verify module initializers so snapshot tests remain stable.
1 parent fb578e1 commit 0fd59c2

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/Cli.Tests/ModuleInitializer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ public static void Init()
137137
VerifierSettings.IgnoreMember<GraphQLRuntimeOptions>(options => options.EnableLegacyDateTimeScalar);
138138
// Ignore UserProvidedPath as that's not serialized in our config file.
139139
VerifierSettings.IgnoreMember<McpRuntimeOptions>(options => options.UserProvidedPath);
140+
// Ignore UserProvidedAllowedHosts as that's not serialized in our config file.
141+
VerifierSettings.IgnoreMember<McpRuntimeOptions>(options => options.UserProvidedAllowedHosts);
140142
// Customise the path where we store snapshots, so they are easier to locate in a PR review.
141143
VerifyBase.DerivePathInfo(
142144
(sourceFile, projectDirectory, type, method) => new(

src/Service.Tests/ModuleInitializer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ public static void Init()
137137
VerifierSettings.IgnoreMember<GraphQLRuntimeOptions>(options => options.EnableLegacyDateTimeScalar);
138138
// Ignore UserProvidedPath as that's not serialized in our config file.
139139
VerifierSettings.IgnoreMember<McpRuntimeOptions>(options => options.UserProvidedPath);
140+
// Ignore UserProvidedAllowedHosts as that's not serialized in our config file.
141+
VerifierSettings.IgnoreMember<McpRuntimeOptions>(options => options.UserProvidedAllowedHosts);
140142
// Customise the path where we store snapshots, so they are easier to locate in a PR review.
141143
VerifyBase.DerivePathInfo(
142144
(sourceFile, projectDirectory, type, method) => new(

0 commit comments

Comments
 (0)