mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-02 14:00:25 +08:00
30 lines
582 B
Go
30 lines
582 B
Go
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
|
|
|
|
package configs_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/TeaOSLab/EdgeNode/internal/configs"
|
|
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
|
|
"gopkg.in/yaml.v3"
|
|
)
|
|
|
|
func TestLoadClusterConfig(t *testing.T) {
|
|
if !testutils.IsSingleTesting() {
|
|
return
|
|
}
|
|
|
|
config, err := configs.LoadClusterConfig()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Logf("%+v", config)
|
|
|
|
configData, err := yaml.Marshal(config)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(string(configData))
|
|
}
|