supabase-operator/testdata/dotnet-client/test/supabase-integration.api-test/SupabaseClientFixture.cs
Peter Kurfer 3104f50c58
Some checks failed
Tests / Run on Ubuntu (push) Waiting to run
Lint / Run on Ubuntu (push) Has been cancelled
E2E Tests / Run on Ubuntu (push) Has been cancelled
refactor: implement control plane as controller-runtime manager
2025-01-20 17:06:41 +01:00

22 lines
No EOL
659 B
C#

using Supabase;
using TUnit.Core.Interfaces;
namespace supabase_integration.api_test;
public class SupabaseClientFixture : IAsyncInitializer
{
public Task InitializeAsync()
{
ApiClient = new Client(
Environment.GetEnvironmentVariable("SUPBASE_URL") ?? "http://localhost:8000",
Environment.GetEnvironmentVariable("SUPBASE_ACCESS_KEY") ?? throw new ArgumentException("Supabase access key is missing."),
new SupabaseOptions
{
AutoConnectRealtime = false
}
);
return Task.CompletedTask;
}
public Client ApiClient { get; private set; }
}