mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
29 lines
881 B
C#
29 lines
881 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using CosmosDB.Testing.AppHost;
|
|
|
|
namespace Microsoft.Agents.AI.Runtime.Storage.CosmosDB.Tests;
|
|
|
|
/// <summary>
|
|
/// Skip test if running on CosmosDB emulator.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false)]
|
|
public sealed class SkipOnEmulatorFactAttribute : FactAttribute
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="SkipOnEmulatorFactAttribute"/> class.
|
|
/// </summary>
|
|
public SkipOnEmulatorFactAttribute()
|
|
{
|
|
if (CosmosDBTestConstants.UseAspireEmulatorForTesting)
|
|
{
|
|
this.Skip = "Skipping test on Aspire-configured CosmosDB emulator.";
|
|
}
|
|
|
|
if (CosmosDBTestConstants.UseEmulatorInCICD)
|
|
{
|
|
this.Skip = "Skipping test on CICD-configured CosmosDB emulator.";
|
|
}
|
|
}
|
|
}
|