This is an automated email from the ASF dual-hosted git repository.

humingcheng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git

commit 2a7f99723f9baf57ddfeb29d51ecfdf3dbb6de8f
Author: humingcheng <[email protected]>
AuthorDate: Wed Feb 26 17:00:23 2025 +0800

    fix ut
---
 server/plugin/auth/buildin/parser_test.go | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/plugin/auth/buildin/parser_test.go 
b/server/plugin/auth/buildin/parser_test.go
index eff630eb..2a37e118 100644
--- a/server/plugin/auth/buildin/parser_test.go
+++ b/server/plugin/auth/buildin/parser_test.go
@@ -25,21 +25,22 @@ import (
 
        _ "github.com/apache/servicecomb-service-center/test"
 
+       "github.com/go-chassis/cari/discovery"
+       "github.com/stretchr/testify/assert"
+
        "github.com/apache/servicecomb-service-center/pkg/rest"
        "github.com/apache/servicecomb-service-center/pkg/util"
        "github.com/apache/servicecomb-service-center/server/plugin/auth"
        
"github.com/apache/servicecomb-service-center/server/plugin/auth/buildin"
        discosvc 
"github.com/apache/servicecomb-service-center/server/service/disco"
        rbacsvc 
"github.com/apache/servicecomb-service-center/server/service/rbac"
-       "github.com/go-chassis/cari/discovery"
-       "github.com/stretchr/testify/assert"
 )
 
 func TestGetAPIParseFunc(t *testing.T) {
        rbacsvc.InitResourceMap()
 
        var serviceIDA, serviceIDB string
-       ctx := context.Background()
+       ctx := util.WithNoCache(util.SetDomainProject(context.Background(), 
"default", "default"))
        defer discosvc.UnregisterManyService(ctx, 
&discovery.DelServicesRequest{ServiceIds: []string{serviceIDA, serviceIDB}, 
Force: true})
 
        response, err := discosvc.RegisterService(ctx, 
&discovery.CreateServiceRequest{

Reply via email to