Publish curated Knowledge Hub source from 2ed833f290b439a7bc91e5fd19b042c269e3bee9
This commit is contained in:
1 parent
10f2edcd29
commit
59f15b2d08
218 files changed
+23995
-1849
No files matched your search
+9
-1
@@ -23,6 +23,8 @@ public sealed class KnowledgeHubIntegrationFactory : WebApplicationFactory<Progr
|
||||
Path.Combine(Path.GetTempPath(), "ikh-tests-imports", Guid.NewGuid().ToString("N"));
|
||||
private readonly string _backupsDirectory =
|
||||
Path.Combine(Path.GetTempPath(), "ikh-tests-backups", Guid.NewGuid().ToString("N"));
|
||||
private readonly string _keysDirectory =
|
||||
Path.Combine(Path.GetTempPath(), "ikh-tests-keys", Guid.NewGuid().ToString("N"));
|
||||
|
||||
public KnowledgeHubIntegrationFactory(
|
||||
PostgresContainerFixture postgres,
|
||||
@@ -63,6 +65,11 @@ public sealed class KnowledgeHubIntegrationFactory : WebApplicationFactory<Progr
|
||||
Directory.Delete(_backupsDirectory, recursive: true);
|
||||
}
|
||||
|
||||
if (Directory.Exists(_keysDirectory))
|
||||
{
|
||||
Directory.Delete(_keysDirectory, recursive: true);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await using var connection = new NpgsqlConnection(_postgres.AdminConnectionString);
|
||||
@@ -124,7 +131,8 @@ public sealed class KnowledgeHubIntegrationFactory : WebApplicationFactory<Progr
|
||||
|
||||
["KnowledgeHub:Paths:Attachments"] = _attachmentsDirectory,
|
||||
["KnowledgeHub:Paths:Imports"] = _importsDirectory,
|
||||
["KnowledgeHub:Paths:Backups"] = _backupsDirectory
|
||||
["KnowledgeHub:Paths:Backups"] = _backupsDirectory,
|
||||
["KnowledgeHub:Paths:Keys"] = _keysDirectory
|
||||
};
|
||||
|
||||
foreach (var (key, value) in _additionalConfiguration)
|
||||
|
||||
+5
-1
@@ -45,7 +45,11 @@ public sealed class PostgresContainerFixture : IAsyncLifetime
|
||||
"postgres:18.4-bookworm@sha256:882236b897e39051d2368c5ccc6cda944904723506b2dfc97f2a8f5bc9afa382")
|
||||
.WithDatabase("knowledge_hub_admin")
|
||||
.WithUsername("knowledge_hub")
|
||||
.WithPassword("integration-test-only");
|
||||
.WithPassword("integration-test-only")
|
||||
.WithLabel("tech.itworx.cleanup-allowed", "true")
|
||||
.WithLabel("tech.itworx.scope", "knowledge-hub-test")
|
||||
.WithLabel("tech.itworx.cleanup-owner", "backend-tests-" + Guid.NewGuid().ToString("N"))
|
||||
.WithLabel("tech.itworx.expires-at", DateTimeOffset.UtcNow.AddHours(6).ToString("O", System.Globalization.CultureInfo.InvariantCulture));
|
||||
|
||||
if (UsesSharedNetwork)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user