chore: add ut
This commit is contained in:
parent
9fc5f427dc
commit
3777517f64
16
relay/adaptor_test.go
Normal file
16
relay/adaptor_test.go
Normal 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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
12
relay/channeltype/url_test.go
Normal file
12
relay/channeltype/url_test.go
Normal 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)
|
||||||
|
})
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user