package mongotest

import (
	"context"
	"fmt"

	"github.com/pfeifferj/container-mom-go/pkg/operator/mongodb"
)

// ErrorMockClient simulates MongoDB errors
type ErrorMockClient struct{}

func NewErrorMockClient() *ErrorMockClient {
	return &ErrorMockClient{}
}

func (m *ErrorMockClient) ListDeployments(ctx context.Context) ([]mongodb.MongoDeployment, error) {
	return nil, fmt.Errorf("failed to query deployments: simulated error")
}

// Implement other interface methods
func (m *ErrorMockClient) GetDeployment(ctx context.Context, id string) (*mongodb.MongoDeployment, error) {
	return nil, fmt.Errorf("failed to get deployment: simulated error")
}

func (m *ErrorMockClient) CreateDeployment(ctx context.Context, deployment *mongodb.MongoDeployment) error {
	return fmt.Errorf("failed to create deployment: simulated error")
}

func (m *ErrorMockClient) UpdateDeployment(ctx context.Context, deployment *mongodb.MongoDeployment) error {
	return fmt.Errorf("failed to update deployment: simulated error")
}

func (m *ErrorMockClient) DeleteDeployment(ctx context.Context, id string) error {
	return fmt.Errorf("failed to delete deployment: simulated error")
}
