server/internal/model/auth/auth_test.go
Chang lue Tsen 8addcc584b init: 1.0.0
2025-04-25 12:08:29 +09:00

31 lines
593 B
Go

package auth
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestAlibabaCloudConfig_Marshal(t *testing.T) {
v := new(AlibabaCloudConfig)
t.Log(v.Marshal())
}
func TestAlibabaCloudConfig_Unmarshal(t *testing.T) {
cfg := AlibabaCloudConfig{
Access: "AccessKeyId",
Secret: "AccessKeySecret",
SignName: "SignName",
Endpoint: "Endpoint",
TemplateCode: "VerifyTemplateCode",
}
data := cfg.Marshal()
v := new(AlibabaCloudConfig)
err := v.Unmarshal(data)
if err != nil {
t.Fatal(err.Error())
}
assert.Equal(t, "AccessKeyId", v.Access)
}