Signed-off-by: zhouqunjie <450705171@qq.com>
This commit is contained in:
zhouqunjie 2022-04-28 16:41:38 +08:00
parent c752e46538
commit ca4b1a34db
4 changed files with 3 additions and 8 deletions

View File

@ -213,8 +213,7 @@ func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, er
if err != nil { if err != nil {
return nil, errors.WithMessage(err, "getTenanters error") return nil, errors.WithMessage(err, "getTenanters error")
} }
//get the available region for product
//regions := tenanter.GetAllRegionIds(req.Provider)
reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()} reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()}
respPodRegion, err := GetPodRegion(ctx, reqPodRegion) respPodRegion, err := GetPodRegion(ctx, reqPodRegion)
if err != nil { if err != nil {

View File

@ -10,7 +10,6 @@ var (
aliTenant []Tenanter aliTenant []Tenanter
tcTenant []Tenanter tcTenant []Tenanter
hwTenant []Tenanter hwTenant []Tenanter
awsTenant []Tenanter
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
@ -28,8 +27,6 @@ func TestMain(m *testing.M) {
if hwTenant, err = GetTenanters(pbtenant.CloudProvider_huawei); err != nil { if hwTenant, err = GetTenanters(pbtenant.CloudProvider_huawei); err != nil {
panic("get hwTenant failed") panic("get hwTenant failed")
} }
if awsTenant, err = GetTenanters(pbtenant.CloudProvider_aws); err != nil {
panic("get awsTenant failed")
}
os.Exit(m.Run()) os.Exit(m.Run())
} }

View File

@ -17,7 +17,6 @@ func TestGetAllRegionIds(t *testing.T) {
{name: "ali", args: args{provider: pbtenant.CloudProvider_ali}}, {name: "ali", args: args{provider: pbtenant.CloudProvider_ali}},
{name: "tencent", args: args{provider: pbtenant.CloudProvider_tencent}}, {name: "tencent", args: args{provider: pbtenant.CloudProvider_tencent}},
{name: "huawei", args: args{provider: pbtenant.CloudProvider_huawei}}, {name: "huawei", args: args{provider: pbtenant.CloudProvider_huawei}},
{name: "aws", args: args{provider: pbtenant.CloudProvider_aws}},
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {

View File

@ -41,7 +41,7 @@ message PodInstance {
message CreatePodsReq { message CreatePodsReq {
// //
repeated CreatePodReq createPodReq = 1; repeated CreatePodReq createPodReq = 1;
} }