sync: 同步 v1.0.4 并脱敏配置与镜像
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gmeta"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/iot/v1"
|
||||
)
|
||||
|
||||
func TestFullSyncReplayPermissionDeclarations(t *testing.T) {
|
||||
post := gmeta.Get(v1.FullSyncReplayReq{}, "x-check-permission").String()
|
||||
get := gmeta.Get(v1.FullSyncReplayStatusReq{}, "x-check-permission").String()
|
||||
if post != "cpm:iot:fullSyncRuns:replay" || get != "cpm:iot:fullSyncRuns:replay:view" {
|
||||
t.Fatalf("permission metadata = %q, %q", post, get)
|
||||
}
|
||||
if strings.TrimSpace(post) == "" || strings.TrimSpace(get) == "" {
|
||||
t.Fatal("missing permission")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user