Skip to content

Commit 05842c7

Browse files
committed
Remove constructor-based DML tool tests per reviewer feedback
Keep only E2E tests that verify CLI option name parsing via Program.Execute().
1 parent 4d5553a commit 05842c7

1 file changed

Lines changed: 0 additions & 90 deletions

File tree

src/Cli.Tests/ConfigureOptionsTests.cs

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,96 +1081,6 @@ public void TestConfigureDescriptionForMcpSettings(string descriptionValue)
10811081
Assert.AreEqual(descriptionValue, runtimeConfig.Runtime.Mcp.Description);
10821082
}
10831083

1084-
/// <summary>
1085-
/// Tests that running "dab configure --runtime.mcp.dml-tools.{tool} {value}" updates
1086-
/// the individual DML tool boolean in the runtime config. Most tools are configured as
1087-
/// direct booleans in the schema (e.g., "describe-entities": true) rather than nested
1088-
/// objects with .enabled; "aggregate-records" additionally supports an object form
1089-
/// when specifying a query-timeout.
1090-
/// </summary>
1091-
[DataTestMethod]
1092-
[DataRow(true, DisplayName = "Enable individual DML tool: describe-entities")]
1093-
[DataRow(false, DisplayName = "Disable individual DML tool: describe-entities")]
1094-
public void TestConfigureIndividualDmlToolForMcpSettings(bool updatedValue)
1095-
{
1096-
// Arrange
1097-
SetupFileSystemWithInitialConfig(INITIAL_CONFIG);
1098-
1099-
// Act: Set describe-entities via the corrected option name (no .enabled suffix)
1100-
ConfigureOptions options = new(
1101-
runtimeMcpDmlToolsDescribeEntitiesEnabled: updatedValue,
1102-
config: TEST_RUNTIME_CONFIG_FILE
1103-
);
1104-
bool isSuccess = TryConfigureSettings(options, _runtimeConfigLoader!, _fileSystem!);
1105-
1106-
// Assert
1107-
Assert.IsTrue(isSuccess);
1108-
string updatedConfig = _fileSystem!.File.ReadAllText(TEST_RUNTIME_CONFIG_FILE);
1109-
Assert.IsTrue(RuntimeConfigLoader.TryParseConfig(updatedConfig, out RuntimeConfig? runtimeConfig));
1110-
Assert.IsNotNull(runtimeConfig.Runtime?.Mcp?.DmlTools);
1111-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.DescribeEntities);
1112-
}
1113-
1114-
/// <summary>
1115-
/// Tests that running "dab configure --runtime.mcp.dml-tools.enabled {value}" sets all
1116-
/// DML tools at once via the bulk toggle.
1117-
/// </summary>
1118-
[DataTestMethod]
1119-
[DataRow(true, DisplayName = "Enable all DML tools at once")]
1120-
[DataRow(false, DisplayName = "Disable all DML tools at once")]
1121-
public void TestConfigureAllDmlToolsForMcpSettings(bool updatedValue)
1122-
{
1123-
// Arrange
1124-
SetupFileSystemWithInitialConfig(INITIAL_CONFIG);
1125-
1126-
// Act: Set all tools via the bulk enabled toggle
1127-
ConfigureOptions options = new(
1128-
runtimeMcpDmlToolsEnabled: updatedValue,
1129-
config: TEST_RUNTIME_CONFIG_FILE
1130-
);
1131-
bool isSuccess = TryConfigureSettings(options, _runtimeConfigLoader!, _fileSystem!);
1132-
1133-
// Assert
1134-
Assert.IsTrue(isSuccess);
1135-
string updatedConfig = _fileSystem!.File.ReadAllText(TEST_RUNTIME_CONFIG_FILE);
1136-
Assert.IsTrue(RuntimeConfigLoader.TryParseConfig(updatedConfig, out RuntimeConfig? runtimeConfig));
1137-
Assert.IsNotNull(runtimeConfig.Runtime?.Mcp?.DmlTools);
1138-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.DescribeEntities);
1139-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.CreateRecord);
1140-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.ReadRecords);
1141-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.UpdateRecord);
1142-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.DeleteRecord);
1143-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.ExecuteEntity);
1144-
Assert.AreEqual(updatedValue, runtimeConfig.Runtime.Mcp.DmlTools.AggregateRecords);
1145-
}
1146-
1147-
/// <summary>
1148-
/// Tests that running "dab configure" with multiple individual DML tool options
1149-
/// correctly updates each tool independently.
1150-
/// </summary>
1151-
[TestMethod]
1152-
public void TestConfigureMultipleIndividualDmlToolsForMcpSettings()
1153-
{
1154-
// Arrange
1155-
SetupFileSystemWithInitialConfig(INITIAL_CONFIG);
1156-
1157-
// Act: Enable describe-entities, disable create-record
1158-
ConfigureOptions options = new(
1159-
runtimeMcpDmlToolsDescribeEntitiesEnabled: true,
1160-
runtimeMcpDmlToolsCreateRecordEnabled: false,
1161-
config: TEST_RUNTIME_CONFIG_FILE
1162-
);
1163-
bool isSuccess = TryConfigureSettings(options, _runtimeConfigLoader!, _fileSystem!);
1164-
1165-
// Assert
1166-
Assert.IsTrue(isSuccess);
1167-
string updatedConfig = _fileSystem!.File.ReadAllText(TEST_RUNTIME_CONFIG_FILE);
1168-
Assert.IsTrue(RuntimeConfigLoader.TryParseConfig(updatedConfig, out RuntimeConfig? runtimeConfig));
1169-
Assert.IsNotNull(runtimeConfig.Runtime?.Mcp?.DmlTools);
1170-
Assert.AreEqual(true, runtimeConfig.Runtime.Mcp.DmlTools.DescribeEntities);
1171-
Assert.AreEqual(false, runtimeConfig.Runtime.Mcp.DmlTools.CreateRecord);
1172-
}
1173-
11741084
/// <summary>
11751085
/// Validates that `dab configure --show-effective-permissions` correctly displays
11761086
/// effective permissions without modifying the config file.

0 commit comments

Comments
 (0)