Skip to content

Commit ecf48a9

Browse files
committed
fix: Fix golangci issues
1 parent 734d02f commit ecf48a9

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

tencentcloud/services/mongodb/resource_tc_mongodb_instance.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ func mongodbAllInstanceReqSet(requestInter interface{}, d *schema.ResourceData)
171171
nodeNum = 3
172172
goodsNum = 1
173173
clusterType = MONGODB_CLUSTER_TYPE_REPLSET
174+
cpu = d.Get("cpu").(int)
174175
memoryInterface = d.Get("memory").(int)
175176
volumeInterface = d.Get("volume").(int)
176177
mongoVersionInterface = d.Get("engine_version").(string)
@@ -203,6 +204,7 @@ func mongodbAllInstanceReqSet(requestInter interface{}, d *schema.ResourceData)
203204
"NodeNum": helper.IntUint64(nodeNum),
204205
"GoodsNum": helper.IntUint64(goodsNum),
205206
"ClusterType": &clusterType,
207+
"CpuCore": helper.IntUint64(cpu),
206208
"Memory": helper.IntUint64(memoryInterface),
207209
"Volume": helper.IntUint64(volumeInterface),
208210
"MongoVersion": &mongoVersionInterface,

tencentcloud/services/mongodb/resource_tc_mongodb_instance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ func TestMongodbInstanceCpu_Update_TriggersUpgrade(t *testing.T) {
804804
d.SetId("cmgo-cpu-test")
805805

806806
// Simulate a cpu-only change from 2 to 4.
807-
d.Set("cpu", 4)
807+
assert.NoError(t, d.Set("cpu", 4))
808808

809809
err := res.Update(d, meta)
810810
assert.NoError(t, err)

0 commit comments

Comments
 (0)