1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 04:15:28 +02:00

feat(support): collect system info bundle to assist support troubleshooting [r8s-157] (#154)

This commit is contained in:
Malcolm Lockyer 2024-12-06 15:38:10 +13:00 committed by GitHub
parent 17648d12fe
commit 783ab253af
17 changed files with 1367 additions and 440 deletions

29
pkg/edge/utils_test.go Normal file
View file

@ -0,0 +1,29 @@
package edge
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetPortainerURLFromEdgeKey(t *testing.T) {
tests := []struct {
name string
edgeKey string
expected string
}{
{
name: "ValidEdgeKey",
edgeKey: "aHR0cHM6Ly9wb3J0YWluZXIuaW98cG9ydGFpbmVyLmlvOjgwMDB8YXNkZnwx",
expected: "https://portainer.io",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result, err := GetPortainerURLFromEdgeKey(tt.edgeKey)
assert.NoError(t, err)
assert.Equal(t, tt.expected, result)
})
}
}