You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/05/30 09:49:29 UTC

[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #1025: Add role manage error code

tianxiaoliang commented on a change in pull request #1025:
URL: https://github.com/apache/servicecomb-service-center/pull/1025#discussion_r642050169



##########
File path: server/service/rbac/rbac_test.go
##########
@@ -111,82 +111,6 @@ func TestInitRBAC(t *testing.T) {
 		assert.NoError(t, err)
 		assert.Greater(t, n, int64(2))
 	})
-	dao.DeleteRole(context.Background(), "tester")
-	t.Run("check is there exist role", func(t *testing.T) {
-		exist, err := dao.RoleExist(context.Background(), "admin")
-		assert.NoError(t, err)
-		assert.Equal(t, true, exist)
-
-		exist, err = dao.RoleExist(context.Background(), "developer")
-		assert.NoError(t, err)
-		assert.Equal(t, true, exist)
-
-		exist, err = dao.RoleExist(context.Background(), "tester")
-		assert.NoError(t, err)
-		assert.Equal(t, false, exist)
-	})
-
-	t.Run("delete the default role", func(t *testing.T) {
-		r, err := dao.DeleteRole(context.Background(), "admin")
-		assert.NoError(t, err)
-		assert.Equal(t, false, r)
-
-		r, err = dao.DeleteRole(context.Background(), "developer")
-		assert.NoError(t, err)
-		assert.Equal(t, false, r)
-	})
-
-	t.Run("delete the not exist role", func(t *testing.T) {
-		_, err := dao.DeleteRole(context.Background(), "tester")
-		assert.NoError(t, err)
-	})
-
-	t.Run("list exist role", func(t *testing.T) {
-		_, _, err := dao.ListRole(context.TODO())
-		assert.NoError(t, err)
-	})
-
-	tester := &rbacmodel.Role{

Review comment:
       为啥删除不少UT




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org