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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user