Use config structs to limit nr of function args

This commit is contained in:
Otto Bittner 2022-11-21 18:01:23 +01:00
parent 928fdcff76
commit 048ab94123
4 changed files with 43 additions and 26 deletions

View file

@ -273,7 +273,8 @@ func TestCreateScalingGroup(t *testing.T) {
require := require.New(t)
k8sClient := &stubK8sClient{createErr: tc.createErr}
err := createScalingGroup(context.Background(), k8sClient, "group-id", "group-Name", "group-Name", updatev1alpha1.WorkerRole)
newScalingGroupConfig := newScalingGroupConfig{k8sClient, "group-id", "group-Name", "group-Name", updatev1alpha1.WorkerRole}
err := createScalingGroup(context.Background(), newScalingGroupConfig)
if tc.wantErr {
assert.Error(err)
return