jx/internal/config/openpgpsignature_test.go
Matthew Rich 8e85305595
Some checks failed
Lint / golangci-lint (push) Failing after 10m2s
Declarative Tests / test (push) Failing after 21s
add openpgp keyring config
2025-08-25 04:00:49 +00:00

34 lines
546 B
Go

// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package config
import (
"context"
"github.com/stretchr/testify/assert"
"testing"
"fmt"
)
func TestNewOpenPGPSignatureConfig(t *testing.T) {
p := NewOpenPGPSignature()
assert.NotNil(t, p)
}
func TestNewOpenPGPSignatureConfigYAML(t *testing.T) {
p := NewOpenPGPSignature()
assert.NotNil(t, p)
config := fmt.Sprintf(`
keyring: |-
%s
%s
`, publicKey, privateKey)
yamlErr := p.LoadYAML(config)
assert.Nil(t, yamlErr)
p.Read(context.Background())
}