mirror of
https://github.com/aceld/kis-flow.git
synced 2025-01-22 23:20:24 +08:00
27 lines
589 B
Go
27 lines
589 B
Go
package test
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/aceld/kis-flow/file"
|
|
"github.com/aceld/kis-flow/kis"
|
|
)
|
|
|
|
func TestConfigExportYaml(t *testing.T) {
|
|
|
|
// 1. Load the configuration file and build the Flow
|
|
if err := file.ConfigImportYaml("load_conf/"); err != nil {
|
|
fmt.Println("Wrong Config Yaml Path!")
|
|
panic(err)
|
|
}
|
|
|
|
// 2. Export the built memory KisFlow structure configuration to files
|
|
flows := kis.Pool().GetFlows()
|
|
for _, flow := range flows {
|
|
if err := file.ConfigExportYaml(flow, "/Users/Aceld/go/src/kis-flow/test/export_conf/"); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
}
|