package recconf

import (
	"fmt"
	"testing"
)

func TestCopyConfig(t *testing.T) {

	src := &RecommendConfig{
		RunMode: "dev",
		ListenConf: ListenConfig{
			HttpAddr: "",
			HttpPort: 80,
		},
//		SortNames:   []string{"item_score"},
//	    FilterNames: []string{"item_exposure_filter"},
	}

	dst := &RecommendConfig{
		RunMode: "dev",
		ListenConf: ListenConfig{
			HttpAddr: "",
			HttpPort: 80,
		},
	}

	fmt.Println(dst)
	CopyConfig(src, dst, func(name string) bool {
		if name == "SortNames" {
			return true
		}
		return false
	})
	fmt.Println(dst)
	CopyConfig(src, dst)
	fmt.Println(dst)
}
