feat: Add Go module and workspace test fixtures

- Created expected JSON files for Go modules and workspaces.
- Added go.mod and go.sum files for example projects.
- Implemented private module structure with expected JSON output.
- Introduced vendored dependencies with corresponding expected JSON.
- Developed PostgresGraphJobStore for managing graph jobs.
- Established SQL migration scripts for graph jobs schema.
- Implemented GraphJobRepository for CRUD operations on graph jobs.
- Created IGraphJobRepository interface for repository abstraction.
- Added unit tests for GraphJobRepository to ensure functionality.
This commit is contained in:
StellaOps Bot
2025-12-06 20:04:03 +02:00
parent a6f1406509
commit 05597616d6
178 changed files with 12022 additions and 4545 deletions

View File

@@ -1,4 +1,6 @@
using System.CommandLine;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using StellaOps.Cli.Commands;
using StellaOps.Cli.Services;
using Xunit;
@@ -10,7 +12,7 @@ public class SystemCommandBuilderTests
[Fact]
public void BuildSystemCommand_AddsMigrationsSubcommands()
{
var system = SystemCommandBuilder.BuildSystemCommand();
var system = BuildSystemCommand();
Assert.NotNull(system);
Assert.Equal("system", system.Name);
Assert.Contains(system.Subcommands, c => c.Name == "migrations-run");
@@ -28,4 +30,16 @@ public class SystemCommandBuilderTests
Assert.Contains("Notify", MigrationModuleRegistry.ModuleNames);
Assert.Contains("Excititor", MigrationModuleRegistry.ModuleNames);
}
private static Command BuildSystemCommand()
{
var services = new ServiceCollection();
services.AddLogging();
services.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
services.AddSingleton<MigrationCommandService>();
var provider = services.BuildServiceProvider();
var verboseOption = new Option<bool>("--verbose");
return SystemCommandBuilder.BuildSystemCommand(provider, verboseOption, CancellationToken.None);
}
}