remove config test

This commit is contained in:
zu1k
2020-08-20 19:25:30 +08:00
parent 1a713ed8e4
commit 70dea95241

View File

@@ -1,36 +0,0 @@
package app
import (
"errors"
"fmt"
"strconv"
"testing"
"github.com/zu1k/proxypool/config"
"github.com/zu1k/proxypool/pkg/getter"
)
func TestConfigFile(t *testing.T) {
c, err := config.Parse("../../source.yaml")
if err != nil {
t.Error(err)
return
}
if c == nil {
t.Error(errors.New("no sources"))
return
}
for idx, source := range c.Sources {
g, err := getter.NewGetter(source.Type, source.Options)
if err != nil {
t.Error(err, idx)
fmt.Println(source)
return
}
if g == nil {
t.Error(errors.New("getter is nil:" + strconv.Itoa(idx)))
fmt.Println(source)
return
}
}
}