spiegel_podman/pkg/machine/provider/platform_test.go
Aryanbhargava18 c8e8cb23cc pkg/machine: remove unused provider functions
The InstalledProviders and SupportedProviders functions were only
used in their own tests and were otherwise dead code. Removing them
entirely cleans up the API surface.

Signed-off-by: Aryanbhargava18 <aryanbhargava644@gmail.com>
2026-08-04 15:09:41 +05:30

26 lines
572 B
Go

package provider
import (
"runtime"
"testing"
"github.com/stretchr/testify/assert"
"go.podman.io/podman/v6/pkg/machine/define"
)
func TestHasPermsForProvider(t *testing.T) {
provider, err := Get()
assert.NoError(t, err)
assert.True(t, HasPermsForProvider(provider.VMType()))
}
func TestHasBadPerms(t *testing.T) {
switch runtime.GOOS {
case "darwin":
assert.False(t, HasPermsForProvider(define.QemuVirt))
case "windows":
assert.False(t, HasPermsForProvider(define.QemuVirt))
case "linux":
assert.False(t, HasPermsForProvider(define.AppleHvVirt))
}
}