From 3777517f64f373fc5f041fb0058331e12f0465f6 Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 23 Jun 2024 14:28:55 +0800 Subject: [PATCH] chore: add ut --- relay/adaptor_test.go | 16 ++++++++++++++++ relay/channeltype/url_test.go | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 relay/adaptor_test.go create mode 100644 relay/channeltype/url_test.go diff --git a/relay/adaptor_test.go b/relay/adaptor_test.go new file mode 100644 index 00000000..884c8e9f --- /dev/null +++ b/relay/adaptor_test.go @@ -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) + } + }) +} diff --git a/relay/channeltype/url_test.go b/relay/channeltype/url_test.go new file mode 100644 index 00000000..2aada279 --- /dev/null +++ b/relay/channeltype/url_test.go @@ -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) + }) +}