mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-17 20:04:36 -05:00
Remove unused name parameter in CreateCluster
This commit is contained in:
parent
b9b618a1f0
commit
158dfe0e2b
@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
type terraformClient interface {
|
||||
CreateCluster(ctx context.Context, provider cloudprovider.Provider, name string, input terraform.Variables) (string, error)
|
||||
CreateCluster(ctx context.Context, provider cloudprovider.Provider, input terraform.Variables) (string, error)
|
||||
DestroyCluster(ctx context.Context) error
|
||||
CleanUpWorkspace() error
|
||||
RemoveInstaller()
|
||||
|
@ -32,7 +32,7 @@ type stubTerraformClient struct {
|
||||
cleanUpWorkspaceErr error
|
||||
}
|
||||
|
||||
func (c *stubTerraformClient) CreateCluster(ctx context.Context, provider cloudprovider.Provider, name string, input terraform.Variables) (string, error) {
|
||||
func (c *stubTerraformClient) CreateCluster(ctx context.Context, provider cloudprovider.Provider, input terraform.Variables) (string, error) {
|
||||
return c.ip, c.createClusterErr
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ func (c *Creator) createAWS(ctx context.Context, cl terraformClient, config *con
|
||||
Debug: config.IsDebugCluster(),
|
||||
}
|
||||
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.AWS, name, vars)
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.AWS, vars)
|
||||
if err != nil {
|
||||
return clusterid.File{}, err
|
||||
}
|
||||
@ -140,7 +140,7 @@ func (c *Creator) createGCP(ctx context.Context, cl terraformClient, config *con
|
||||
Debug: config.IsDebugCluster(),
|
||||
}
|
||||
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.GCP, name, &vars)
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.GCP, &vars)
|
||||
if err != nil {
|
||||
return clusterid.File{}, err
|
||||
}
|
||||
@ -176,7 +176,7 @@ func (c *Creator) createAzure(ctx context.Context, cl terraformClient, config *c
|
||||
|
||||
vars = normalizeAzureURIs(vars)
|
||||
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.Azure, name, &vars)
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.Azure, &vars)
|
||||
if err != nil {
|
||||
return clusterid.File{}, err
|
||||
}
|
||||
@ -273,7 +273,7 @@ func (c *Creator) createQEMU(ctx context.Context, cl terraformClient, lv libvirt
|
||||
Firmware: config.Provider.QEMU.Firmware,
|
||||
}
|
||||
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.QEMU, name, &vars)
|
||||
ip, err := cl.CreateCluster(ctx, cloudprovider.QEMU, &vars)
|
||||
if err != nil {
|
||||
return clusterid.File{}, err
|
||||
}
|
||||
|
@ -58,9 +58,7 @@ func New(ctx context.Context, workingDir string) (*Client, error) {
|
||||
}
|
||||
|
||||
// CreateCluster creates a Constellation cluster using Terraform.
|
||||
func (c *Client) CreateCluster(
|
||||
ctx context.Context, provider cloudprovider.Provider, name string, vars Variables,
|
||||
) (string, error) {
|
||||
func (c *Client) CreateCluster(ctx context.Context, provider cloudprovider.Provider, vars Variables) (string, error) {
|
||||
if err := prepareWorkspace(c.file, provider, c.workingDir); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ func TestCreateCluster(t *testing.T) {
|
||||
workingDir: constants.TerraformWorkingDir,
|
||||
}
|
||||
|
||||
ip, err := c.CreateCluster(context.Background(), tc.provider, "test", tc.vars)
|
||||
ip, err := c.CreateCluster(context.Background(), tc.provider, tc.vars)
|
||||
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
|
Loading…
Reference in New Issue
Block a user