mirror of
				https://github.com/containers/podman.git
				synced 2025-11-04 08:56:05 +08:00 
			
		
		
		
	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>
		
			
				
	
	
		
			20 lines
		
	
	
		
			371 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			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))
 | 
						|
}
 |