mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +00:00
Fix test compilation after merge
Update instance tests to use correct type names: - CreateInstanceOptions -> Options - InstanceStatus -> Status 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -207,7 +207,7 @@ func TestSetOptions_PreservesNodes(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create instance with initial nodes
|
// Create instance with initial nodes
|
||||||
initialOptions := &instance.CreateInstanceOptions{
|
initialOptions := &instance.Options{
|
||||||
BackendType: backends.BackendTypeLlamaCpp,
|
BackendType: backends.BackendTypeLlamaCpp,
|
||||||
Nodes: []string{"worker1"},
|
Nodes: []string{"worker1"},
|
||||||
LlamaServerOptions: &llamacpp.LlamaServerOptions{
|
LlamaServerOptions: &llamacpp.LlamaServerOptions{
|
||||||
@@ -216,11 +216,11 @@ func TestSetOptions_PreservesNodes(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
mockOnStatusChange := func(oldStatus, newStatus instance.InstanceStatus) {}
|
mockOnStatusChange := func(oldStatus, newStatus instance.Status) {}
|
||||||
inst := instance.NewInstance("test-instance", backendConfig, globalSettings, initialOptions, "main", mockOnStatusChange)
|
inst := instance.NewInstance("test-instance", backendConfig, globalSettings, initialOptions, "main", mockOnStatusChange)
|
||||||
|
|
||||||
// Try to update with different nodes
|
// Try to update with different nodes
|
||||||
updatedOptions := &instance.CreateInstanceOptions{
|
updatedOptions := &instance.Options{
|
||||||
BackendType: backends.BackendTypeLlamaCpp,
|
BackendType: backends.BackendTypeLlamaCpp,
|
||||||
Nodes: []string{"worker2"}, // Attempt to change node
|
Nodes: []string{"worker2"}, // Attempt to change node
|
||||||
LlamaServerOptions: &llamacpp.LlamaServerOptions{
|
LlamaServerOptions: &llamacpp.LlamaServerOptions{
|
||||||
@@ -434,7 +434,7 @@ func TestUnmarshalJSON(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCreateInstanceOptionsValidation(t *testing.T) {
|
func TestCreateOptionsValidation(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
maxRestarts *int
|
maxRestarts *int
|
||||||
|
|||||||
Reference in New Issue
Block a user