提交 053b1e66 编写于 作者: L liqingping

test: server test error

上级 87edfc16
......@@ -87,7 +87,7 @@ lint:
test: ginkgo ## Run tests.
$(GINKGO) -nodes 4 -v -cover -coverprofile=coverage.out ./pkg/...
go tool cover -func=./pkg/controllers/coverage.out
go tool cover -func=./pkg/server/http/coverage.out
go tool cover -func=./pkg/server/coverage.out
go tool cover -func=./pkg/common/gpuallocator/coverage.out
##@ Build
......
......@@ -77,7 +77,7 @@ var _ = BeforeSuite(func() {
By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}
......@@ -110,16 +110,19 @@ var _ = BeforeSuite(func() {
fmt.Printf("node: %s added to cluster\n", node.Name)
}
metricPort := config.GinkgoConfig.ParallelNode + 8200
metricAddress := fmt.Sprintf(":%d", metricPort)
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme.Scheme,
Scheme: scheme.Scheme,
MetricsBindAddress: metricAddress,
})
Expect(err).NotTo(HaveOccurred())
ctx := dicontext.NewContext(context.Background(),
cfg,
mgr.GetClient(),
mgr.GetEventRecorderFor("di-operator"),
ctrl.Log.WithName("di-operator"))
mgr.GetEventRecorderFor("di-server"),
ctrl.Log.WithName("di-server"))
localServingPort = port + config.GinkgoConfig.ParallelNode
addrPort := fmt.Sprintf("%s:%d", localServingHost, localServingPort)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册