mirror of
https://github.com/singchia/frontier.git
synced 2025-09-26 20:31:25 +08:00
31 lines
558 B
Go
31 lines
558 B
Go
package config
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestGenDefaultConfig(t *testing.T) {
|
|
file, err := os.OpenFile("../../../etc/frontlas.yaml", os.O_TRUNC|os.O_CREATE|os.O_RDWR, 0666)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
defer file.Close()
|
|
err = genMinConfig(file)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
}
|
|
|
|
func TestGenAllConfig(t *testing.T) {
|
|
file, err := os.OpenFile("../../../etc/frontlas_all.yaml", os.O_TRUNC|os.O_CREATE|os.O_RDWR, 0666)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
defer file.Close()
|
|
err = genAllConfig(file)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
}
|