MCPcopy
hub / github.com/apache/devlake / TestEncode

Function TestEncode

backend/core/plugin/plugin_utils_test.go:46–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

44}
45
46func TestEncode(t *testing.T) {
47 encryptionSecret, _ := RandomEncryptionSecret()
48 type args struct {
49 Input string
50 }
51 tests := []struct {
52 name string
53 args args
54 wantErr bool
55 }{
56 {
57 "",
58 args{"bGlhbmcuemhhbmdAbWVyaWNvLmRldjprYUU2eWpNY1VYV2FCNUhIS3BGRkQ1RTg="},
59 false,
60 },
61 }
62 for _, tt := range tests {
63 t.Run(tt.name, func(t *testing.T) {
64 got, err := Encrypt(encryptionSecret, tt.args.Input)
65 if (err != nil) != tt.wantErr {
66 t.Errorf("Encode() error = %v, wantErr %v", err, tt.wantErr)
67 return
68 }
69 t.Log(got)
70 })
71 }
72}

Callers

nothing calls this directly

Calls 4

RandomEncryptionSecretFunction · 0.85
EncryptFunction · 0.85
RunMethod · 0.80
LogMethod · 0.65

Tested by

no test coverage detected