Enchantrix/pkg/crypt/crypt_internal_test.go
google-labs-jules[bot] 1a4b2923bf test: increase test coverage to 100%
- Refactors `trix.Encode` and `trix.Decode` to allow for dependency injection, enabling the testing of I/O error paths.
- Adds comprehensive tests for the `trix` package to cover all error paths.
- Adds tests for the `Fletcher` checksums and `ensureRSA` function in the `crypt` package.
- Adds tests for the `lthn` package to cover the `SetKeyMap` and `GetKeyMap` functions.
- Adds tests for the `chachapoly` package to cover error paths.
- Adds tests for the `rsa` package to cover error paths.
2025-11-03 00:17:27 +00:00

13 lines
171 B
Go

package crypt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestEnsureRSA(t *testing.T) {
s := &Service{}
s.ensureRSA()
assert.NotNil(t, s.rsa)
}