- 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.
13 lines
171 B
Go
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)
|
|
}
|