1 Star 0 Fork 0

ryancartoon/sensu-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
extensions_test.go 808 Bytes
一键复制 编辑 原始数据 按行查看 历史
package routers
import (
"testing"
"github.com/gorilla/mux"
corev2 "github.com/sensu/sensu-go/api/core/v2"
"github.com/sensu/sensu-go/testing/mockstore"
)
func TestExtensionsRouter(t *testing.T) {
// Setup the router
s := &mockstore.MockStore{}
router := NewExtensionsRouter(s)
parentRouter := mux.NewRouter().PathPrefix(corev2.URLPrefix).Subrouter()
router.Mount(parentRouter)
empty := &corev2.Extension{}
fixture := corev2.FixtureExtension("foo")
tests := []routerTestCase{}
tests = append(tests, getTestCases(fixture)...)
tests = append(tests, listTestCases(empty)...)
tests = append(tests, createTestCases(empty)...)
tests = append(tests, updateTestCases(fixture)...)
tests = append(tests, deleteTestCases(fixture)...)
for _, tt := range tests {
run(t, tt, parentRouter, s)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ryancartoon/sensu-go.git
git@gitee.com:ryancartoon/sensu-go.git
ryancartoon
sensu-go
sensu-go
v5.10.1

搜索帮助