summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-07-11 07:28:32 +0200
committerRory& <root@rory.gay>2026-07-11 07:28:32 +0200
commitaa926a530222faefd5934634fee720a75730948f (patch)
treebfc671d078d795c5a49108142cdc553beead23a4
parentUse error handler in CDN, clearer CDN errors, fix cdn in nixosTests (diff)
downloadserver-ts-aa926a530222faefd5934634fee720a75730948f.tar.xz
Skip Klipy tests in nixosTests
-rw-r--r--extra/admin-api/Tests/Spacebar.Tests/Config.cs1
-rw-r--r--extra/admin-api/Tests/Spacebar.Tests/Tests/GifTests.cs3
-rw-r--r--extra/admin-api/Tests/Spacebar.Tests/appsettings.json3
-rw-r--r--nix/tests/test-bundle-starts.nix1
4 files changed, 7 insertions, 1 deletions
diff --git a/extra/admin-api/Tests/Spacebar.Tests/Config.cs b/extra/admin-api/Tests/Spacebar.Tests/Config.cs

index 7419caa2..41254cb6 100644 --- a/extra/admin-api/Tests/Spacebar.Tests/Config.cs +++ b/extra/admin-api/Tests/Spacebar.Tests/Config.cs
@@ -9,4 +9,5 @@ public class Config { public string TestInstance { get; set; } public int RegisterConcurrentCount { get; set; } + public bool OfflineMode { get; set; } } \ No newline at end of file diff --git a/extra/admin-api/Tests/Spacebar.Tests/Tests/GifTests.cs b/extra/admin-api/Tests/Spacebar.Tests/Tests/GifTests.cs
index 765108f8..2cbbf8e1 100644 --- a/extra/admin-api/Tests/Spacebar.Tests/Tests/GifTests.cs +++ b/extra/admin-api/Tests/Spacebar.Tests/Tests/GifTests.cs
@@ -39,6 +39,7 @@ public class GifTests(ITestOutputHelper testOutputHelper, TestFixture fixture) : [Theory, MemberData(nameof(GifSearchTestMatrix))] public async Task SearchGifs(string query, string provider) { + Assert.SkipWhen(_config.OfflineMode, "Cannot test GIF providers while offline."); var resp = await Assert.HttpSuccess(await Client.ApiHttpClient.GetAsync($"gifs/search?q={query}&provider={provider}", TestContext.Current.CancellationToken)); var respContent = await resp.Content.ReadFromJsonAsync<List<GifItem>>(cancellationToken: TestContext.Current.CancellationToken); @@ -57,6 +58,7 @@ public class GifTests(ITestOutputHelper testOutputHelper, TestFixture fixture) : [Theory, MemberData(nameof(GifProviders))] public async Task GetTrendingCategories(string provider) { + Assert.SkipWhen(_config.OfflineMode, "Cannot test GIF providers while offline."); var resp = await Assert.HttpSuccess(await Client.ApiHttpClient.GetAsync($"gifs/trending?provider={provider}", TestContext.Current.CancellationToken)); var respContent = await resp.Content.ReadFromJsonAsync<TrendingGifsResult>(cancellationToken: TestContext.Current.CancellationToken); @@ -82,6 +84,7 @@ public class GifTests(ITestOutputHelper testOutputHelper, TestFixture fixture) : [Theory, MemberData(nameof(GifProviders))] public async Task GetTrendingGifs(string provider) { + Assert.SkipWhen(_config.OfflineMode, "Cannot test GIF providers while offline."); var resp = await Assert.HttpSuccess(await Client.ApiHttpClient.GetAsync($"gifs/trending-gifs?provider={provider}", TestContext.Current.CancellationToken)); var respContent = await resp.Content.ReadFromJsonAsync<List<GifItem>>(cancellationToken: TestContext.Current.CancellationToken); diff --git a/extra/admin-api/Tests/Spacebar.Tests/appsettings.json b/extra/admin-api/Tests/Spacebar.Tests/appsettings.json
index 44ec2796..249a2e7f 100644 --- a/extra/admin-api/Tests/Spacebar.Tests/appsettings.json +++ b/extra/admin-api/Tests/Spacebar.Tests/appsettings.json
@@ -2,6 +2,7 @@ "Configuration": { "TestInstance": "http://localhost:3001", // "TestInstance": "http://localhost:5085", - "RegisterConcurrentCount": 150 + "RegisterConcurrentCount": 150, + "OfflineMode": false } } \ No newline at end of file diff --git a/nix/tests/test-bundle-starts.nix b/nix/tests/test-bundle-starts.nix
index 89d26706..e15982e7 100644 --- a/nix/tests/test-bundle-starts.nix +++ b/nix/tests/test-bundle-starts.nix
@@ -19,6 +19,7 @@ let Configuration = { TestInstance = "http://localhost:3001"; RegisterConcurrentCount = 150; + OfflineMode = true; }; } );