Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Microsoft.Mcp.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@
<Project Path="servers/Azure.Mcp.Server/src/Azure.Mcp.Server.csproj" />
</Folder>
<Folder Name="/servers/Azure.Mcp.Server/tests/">
<Project Path="servers/Azure.Mcp.Server/tests/Azure.Mcp.Server.UnitTests/Azure.Mcp.Server.UnitTests.csproj" />
<Project Path="servers/Azure.Mcp.Server/tests/Azure.Mcp.Server.Tests/Azure.Mcp.Server.Tests.csproj" />
</Folder>
<Folder Name="/servers/Fabric.Mcp.Server/" />
<Folder Name="/servers/Fabric.Mcp.Server/src/">
<Project Path="servers/Fabric.Mcp.Server/src/Fabric.Mcp.Server.csproj" />
</Folder>
<Folder Name="/servers/Fabric.Mcp.Server/tests/">
<Project Path="servers/Fabric.Mcp.Server/tests/Fabric.Mcp.Server.UnitTests/Fabric.Mcp.Server.UnitTests.csproj" />
<Project Path="servers/Fabric.Mcp.Server/tests/Fabric.Mcp.Server.Tests/Fabric.Mcp.Server.Tests.csproj" />
</Folder>
<Folder Name="/servers/Template.Mcp.Server/" />
<Folder Name="/servers/Template.Mcp.Server/src/">
Expand All @@ -76,15 +76,14 @@
<Project Path="tools/Azure.Mcp.Tools.Acr/src/Azure.Mcp.Tools.Acr.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Acr/tests/">
<Project Path="tools/Azure.Mcp.Tools.Acr/tests/Azure.Mcp.Tools.Acr.LiveTests/Azure.Mcp.Tools.Acr.LiveTests.csproj" />
<Project Path="tools/Azure.Mcp.Tools.Acr/tests/Azure.Mcp.Tools.Acr.UnitTests/Azure.Mcp.Tools.Acr.UnitTests.csproj" />
<Project Path="tools/Azure.Mcp.Tools.Acr/tests/Azure.Mcp.Tools.Acr.Tests/Azure.Mcp.Tools.Acr.Tests.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Advisor/" />
<Folder Name="/tools/Azure.Mcp.Tools.Advisor/src/">
<Project Path="tools/Azure.Mcp.Tools.Advisor/src/Azure.Mcp.Tools.Advisor.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Advisor/tests/">
<Project Path="tools/Azure.Mcp.Tools.Advisor/tests/Azure.Mcp.Tools.Advisor.UnitTests/Azure.Mcp.Tools.Advisor.UnitTests.csproj" />
<Project Path="tools/Azure.Mcp.Tools.Advisor/tests/Azure.Mcp.Tools.Advisor.Tests/Azure.Mcp.Tools.Advisor.Tests.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Aks/" />
<Folder Name="/tools/Azure.Mcp.Tools.Aks/src/">
Expand Down
2 changes: 1 addition & 1 deletion eng/scripts/Test-Code.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ try {
$command = "dotnet test $coverageArg $resultsArg $loggerArg"

if ($filterArg) {
$command += "--filter `"$filterArg`""
$command += " --filter `"$filterArg`""
}

Invoke-LoggedMsBuildCommand -Command $command -AllowedExitCodes @(0, 1)
Expand Down
7 changes: 3 additions & 4 deletions servers/Azure.Mcp.Server/Azure.Mcp.Server.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,22 @@
<Project Path="./src/Azure.Mcp.Server.csproj" />
</Folder>
<Folder Name="/servers/Azure.Mcp.Server/tests/">
<Project Path="./tests/Azure.Mcp.Server.UnitTests/Azure.Mcp.Server.UnitTests.csproj" />
<Project Path="./tests/Azure.Mcp.Server.Tests/Azure.Mcp.Server.Tests.csproj" />
</Folder>
<Folder Name="/tools/" />
<Folder Name="/tools/Azure.Mcp.Tools.Acr/" />
<Folder Name="/tools/Azure.Mcp.Tools.Acr/src/">
<Project Path="../../tools/Azure.Mcp.Tools.Acr/src/Azure.Mcp.Tools.Acr.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Acr/tests/">
<Project Path="../../tools/Azure.Mcp.Tools.Acr/tests/Azure.Mcp.Tools.Acr.LiveTests/Azure.Mcp.Tools.Acr.LiveTests.csproj" />
<Project Path="../../tools/Azure.Mcp.Tools.Acr/tests/Azure.Mcp.Tools.Acr.UnitTests/Azure.Mcp.Tools.Acr.UnitTests.csproj" />
<Project Path="../../tools/Azure.Mcp.Tools.Acr/tests/Azure.Mcp.Tools.Acr.Tests/Azure.Mcp.Tools.Acr.Tests.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Advisor/" />
<Folder Name="/tools/Azure.Mcp.Tools.Advisor/src/">
<Project Path="../../tools/Azure.Mcp.Tools.Advisor/src/Azure.Mcp.Tools.Advisor.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Advisor/tests/">
<Project Path="../../tools/Azure.Mcp.Tools.Advisor/tests/Azure.Mcp.Tools.Advisor.UnitTests/Azure.Mcp.Tools.Advisor.UnitTests.csproj" />
<Project Path="../../tools/Azure.Mcp.Tools.Advisor/tests/Azure.Mcp.Tools.Advisor.Tests/Azure.Mcp.Tools.Advisor.Tests.csproj" />
</Folder>
<Folder Name="/tools/Azure.Mcp.Tools.Aks/" />
<Folder Name="/tools/Azure.Mcp.Tools.Aks/src/">
Expand Down
2 changes: 1 addition & 1 deletion servers/Azure.Mcp.Server/src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Azure.Mcp.Core.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Azure.Mcp.Server.UnitTests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Azure.Mcp.Server.Tests")]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
<HasLiveTests>false</HasLiveTests>
<HasUnitTests>true</HasUnitTests>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Azure.Mcp.Server.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.Mcp.Core.Services.ProcessExecution;
using Xunit;

namespace Azure.Mcp.Server.UnitTests.Infrastructure;
namespace Azure.Mcp.Server.Tests.Infrastructure;

public class CommandMetadataSyncTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Xunit;

namespace Azure.Mcp.Server.UnitTests.Infrastructure;
namespace Azure.Mcp.Server.Tests.Infrastructure;

public class ConsolidatedModeTests
{
Expand Down Expand Up @@ -79,7 +79,7 @@ public async Task ConsolidatedMode_Should_List_Tools_Successfully()
}
}

private static async Task<string?> ReadJsonRpcResponseAsync(System.IO.StreamReader reader)
private static async Task<string?> ReadJsonRpcResponseAsync(StreamReader reader)
{
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(10));
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Xunit;

namespace Azure.Mcp.Server.UnitTests.Infrastructure;
namespace Azure.Mcp.Server.Tests.Infrastructure;

public class GetTargetAreaNameTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.Mcp.Core.Areas.Server.Commands.ServerInstructions;
using Xunit;

namespace Azure.Mcp.Server.UnitTests.Infrastructure;
namespace Azure.Mcp.Server.Tests.Infrastructure;

public class ServiceRegistrationTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using NSubstitute;
using Xunit;

namespace Azure.Mcp.Server.UnitTests.Infrastructure;
namespace Azure.Mcp.Server.Tests.Infrastructure;

/// <summary>
/// Tests to ensure specific tool names that Visual Studio depends on remain stable.
Expand Down
2 changes: 1 addition & 1 deletion servers/Fabric.Mcp.Server/Fabric.Mcp.Server.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Project Path="./src/Fabric.Mcp.Server.csproj" />
</Folder>
<Folder Name="/servers/Fabric.Mcp.Server/tests/">
<Project Path="./tests/Fabric.Mcp.Server.UnitTests/Fabric.Mcp.Server.UnitTests.csproj" />
<Project Path="./tests/Fabric.Mcp.Server.Tests/Fabric.Mcp.Server.Tests.csproj" />
</Folder>
<Folder Name="/tools/" />
<Folder Name="/tools/Fabric.Mcp.Tools.Core/" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
<HasLiveTests>false</HasLiveTests>
<HasUnitTests>true</HasUnitTests>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Fabric.Mcp.Server.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Xunit;

namespace Fabric.Mcp.Server.UnitTests.Infrastructure;
namespace Fabric.Mcp.Server.Tests.Infrastructure;

public class ServerStartupTests
{
Expand Down
3 changes: 1 addition & 2 deletions tools/Azure.Mcp.Tools.Acr/src/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Azure.Mcp.Tools.Acr.UnitTests")]
[assembly: InternalsVisibleTo("Azure.Mcp.Tools.Acr.LiveTests")]
[assembly: InternalsVisibleTo("Azure.Mcp.Tools.Acr.Tests")]

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
using Microsoft.Mcp.Tests.Helpers;
using Xunit;

namespace Azure.Mcp.Tools.Acr.LiveTests;
namespace Azure.Mcp.Tools.Acr.Tests;

public class AcrCommandTests(ITestOutputHelper output, TestProxyFixture fixture, LiveServerFixture liveServerFixture) : RecordedCommandTestsBase(output, fixture, liveServerFixture)
public class AcrCommandTests(ITestOutputHelper output, TestProxyFixture fixture, LiveServerFixture liveServerFixture)
: RecordedCommandTestsBase(output, fixture, liveServerFixture)
{
public override List<string> DisabledDefaultSanitizers =>
[
Expand All @@ -23,7 +24,7 @@ public class AcrCommandTests(ITestOutputHelper output, TestProxyFixture fixture,
public override List<BodyKeySanitizer> BodyKeySanitizers =>
[
..base.BodyKeySanitizers,
new BodyKeySanitizer(new BodyKeySanitizerBody("$..data.properties.loginServer") {
new(new("$..data.properties.loginServer") {
Comment thread
alzimmermsft marked this conversation as resolved.
Value = "sanitized.azurecr.io"
})
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<HasLiveTests>true</HasLiveTests>
<HasUnitTests>true</HasUnitTests>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,6 +21,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\Azure.Mcp.Tools.Acr.csproj" />
<ProjectReference Include="$(RepoRoot)servers\Azure.Mcp.Server\src\Azure.Mcp.Server.csproj" />
<ProjectReference Include="$(RepoRoot)core\Azure.Mcp.Core\tests\Azure.Mcp.Tests\Azure.Mcp.Tests.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using NSubstitute.ExceptionExtensions;
using Xunit;

namespace Azure.Mcp.Tools.Acr.UnitTests.Registry;
namespace Azure.Mcp.Tools.Acr.Tests.Registry;

public class RegistryListCommandTests : CommandUnitTestsBase<RegistryListCommand, IAcrService>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using NSubstitute.ExceptionExtensions;
using Xunit;

namespace Azure.Mcp.Tools.Acr.UnitTests.Registry;
namespace Azure.Mcp.Tools.Acr.Tests.Registry;

public class RegistryRepositoryListCommandTests : CommandUnitTestsBase<RegistryRepositoryListCommand, IAcrService>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "",
"TagPrefix": "Azure.Mcp.Tools.Acr.Tests",
"Tag": "Azure.Mcp.Tools.Acr.Tests_d98afeda63"
}
3 changes: 1 addition & 2 deletions tools/Azure.Mcp.Tools.Advisor/src/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Azure.Mcp.Tools.Advisor.UnitTests")]
[assembly: InternalsVisibleTo("Azure.Mcp.Tools.Advisor.LiveTests")]
[assembly: InternalsVisibleTo("Azure.Mcp.Tools.Advisor.Tests")]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
<HasLiveTests>false</HasLiveTests>
<HasUnitTests>true</HasUnitTests>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\core\Azure.Mcp.Core\tests\Azure.Mcp.Tests\Azure.Mcp.Tests.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using NSubstitute.ExceptionExtensions;
using Xunit;

namespace Azure.Mcp.Tools.Advisor.UnitTests.Recommendation;
namespace Azure.Mcp.Tools.Advisor.Tests.Recommendation;

public class RecommendationListCommandTests : CommandUnitTestsBase<RecommendationListCommand, IAdvisorService>
{
Expand Down