~james/core

core/spindle/engine_microvm_other_test.go -rw-r--r-- 565 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 15 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//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")
	}
}