chore: add ut

This commit is contained in:
JustSong 2024-06-23 14:28:55 +08:00
parent 9fc5f427dc
commit 3777517f64
2 changed files with 28 additions and 0 deletions

16
relay/adaptor_test.go Normal file
View File

@ -0,0 +1,16 @@
package relay
import (
. "github.com/smartystreets/goconvey/convey"
"github.com/songquanpeng/one-api/relay/apitype"
"testing"
)
func TestGetAdaptor(t *testing.T) {
Convey("get adaptor", t, func() {
for i := 0; i < apitype.Dummy; i++ {
a := GetAdaptor(i)
So(a, ShouldNotBeNil)
}
})
}

View File

@ -0,0 +1,12 @@
package channeltype
import (
. "github.com/smartystreets/goconvey/convey"
"testing"
)
func TestChannelBaseURLs(t *testing.T) {
Convey("channel base urls", t, func() {
So(len(ChannelBaseURLs), ShouldEqual, Dummy)
})
}