// Copyright (c) Microsoft. All rights reserved. using VectorData.ConformanceTests.Xunit; namespace AzureAISearch.ConformanceTests.Support; /// /// Checks whether the sqlite_vec extension is properly installed, and skips the test(s) otherwise. /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)] public sealed class AzureAISearchUrlRequiredAttribute : Attribute, ITestCondition { public ValueTask IsMetAsync() => new(AzureAISearchTestEnvironment.IsConnectionInfoDefined); public string Skip { get; set; } = "Service URL is not configured, set AzureAISearch:ServiceUrl (and AzureAISearch:ApiKey if you don't use managed identity)."; public string SkipReason => this.Skip; }