//go:build !linux

package spindle

import (
	"context"
	"log/slog"
	"testing"

	"tangled.org/core/spindle/config"
)

func TestLocalEnginesWithoutMicrovm(t *testing.T) {
	engines, err := localEngines(context.Background(), &config.Config{}, nil, nil, slog.New(slog.DiscardHandler))
	if err != nil {
		t.Fatalf("localEngines: %v", err)
	}
	for _, name := range []string{"nixery", "dummy"} {
		if engines[name] == nil {
			t.Errorf("engine %q missing", name)
		}
	}
	if _, ok := engines["microvm"]; ok {
		t.Error("microvm should be left out where it can't run")
	}
}
