Skip to content

Commit 53e1a58

Browse files
committed
fix lint errors
1 parent 06b485f commit 53e1a58

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

cfn-resources/cluster/cmd/resource/mappings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func TestNewHardwareSpec(t *testing.T) {
113113
hardwareSpec := resource.NewHardwareSpec(&tc.spec)
114114
hwSpecJSON, err := json.Marshal(hardwareSpec)
115115
require.NoError(t, err)
116-
assert.Equal(t, tc.expected, string(hwSpecJSON))
116+
assert.JSONEq(t, tc.expected, string(hwSpecJSON))
117117
})
118118
}
119119
}

cfn-resources/test/e2e/cluster/cluster_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,10 @@ func checkReplicationSpecs(a *assert.Assertions, replicationSpecs []admin.Replic
225225
hwSpec := config.GetElectableSpecs()
226226
a.Equal(nodeCount, hwSpec.GetNodeCount())
227227
}
228-
if i == 0 {
228+
switch i {
229+
case 0:
229230
a.Equal(zone1, spec.GetZoneName())
230-
} else if i == 1 {
231+
case 1:
231232
a.Equal(zone2, spec.GetZoneName())
232233
}
233234
}

cfn-resources/third-party-integration/cmd/resource/resource.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,8 @@ func modelToIntegration(currentModel *Model) (out *admin.ThridPartyIntegration)
326326
}
327327

328328
func integrationToModel(currentModel Model, integration *admin.ThridPartyIntegration) Model {
329-
enabled := false
330329
// if "Enabled" is not set in the inputs we dont want to return "Enabled" in outputs
331-
if currentModel.Enabled != nil {
332-
enabled = true
333-
}
330+
enabled := currentModel.Enabled != nil
334331

335332
/*
336333
The variables from the thirdparty integration are not returned back in reposnse because most of the variables are sensitive variables.

0 commit comments

Comments
 (0)