Files
podman/pkg/machine/config_test.go
Paul Holzinger d60757cca6 pkg/machine: cleanup MakeSSHURL
Remove unnecessary type redirection and just make it a normal function.
Also unexport it and move the test as it does not need to be public and
remove the default value assignments from the struct.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-16 14:41:14 +01:00

20 lines
371 B
Go

//go:build amd64 || arm64
package machine
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetSSHIdentityPath(t *testing.T) {
name := "p-test"
datadir, err := GetGlobalDataDir()
assert.Nil(t, err)
identityPath, err := GetSSHIdentityPath(name)
assert.Nil(t, err)
assert.Equal(t, identityPath, filepath.Join(datadir, name))
}