spiegel_podman/pkg/machine/certificates/certificates_linux_test.go
Mario Loriedo f7dd6156d3 Import host certificates at machine startup on Windows
Implements the feature introduced in the design
document added with commit 4bdc1d37

Fixes https://redhat.atlassian.net/browse/RUN-4260

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-04-16 13:35:40 +02:00

26 lines
566 B
Go

package certificates
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func verifyCertificateFile(_ string) error {
return nil
}
func TestExtractAndSaveCertificates(t *testing.T) {
certs := extractHostCertificates()
// On Linux extractHostCertificates is not implemented
// therefore `certs` is expected to be empty.
assert.Empty(t, certs)
filePath := filepath.Join(t.TempDir(), "cert.pem")
err := saveCertificatesToPEM(certs, filePath)
assert.NoError(t, err)
err = verifyCertificateFile(filePath)
assert.NoError(t, err)
}