Files
microsoft--semantic-kernel/dotnet/test/VectorData/CosmosNoSql.ConformanceTests/Support/CosmosConnectionStringRequiredAttribute.cs
T
wehub-resource-sync b957a53def
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:21:23 +08:00

20 lines
741 B
C#

// Copyright (c) Microsoft. All rights reserved.
using VectorData.ConformanceTests.Xunit;
namespace CosmosNoSql.ConformanceTests.Support;
/// <summary>
/// Checks whether the sqlite_vec extension is properly installed, and skips the test(s) otherwise.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
public sealed class CosmosConnectionStringRequiredAttribute : Attribute, ITestCondition
{
public ValueTask<bool> IsMetAsync() => new(CosmosNoSqlTestEnvironment.IsConnectionStringDefined);
public string Skip { get; set; } = "The Cosmos connection string hasn't been configured (CosmosNoSql:ConnectionString).";
public string SkipReason
=> this.Skip;
}