mirror of https://github.com/docker/compose.git
Fix linter warnings
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
30029fa701
commit
4642bfa172
|
@ -117,7 +117,7 @@ func (c client) GetEcsTaskExecutionRole(spec types.ServiceConfig) (string, error
|
|||
|
||||
type convertAPI interface {
|
||||
GetDefaultVPC() (string, error)
|
||||
GetSubNets(vpcId string) ([]string, error)
|
||||
GetSubNets(vpcID string) ([]string, error)
|
||||
ListRolesForPolicy(policy string) ([]string, error)
|
||||
GetRoleArn(name string) (string, error)
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/golang/mock/gomock"
|
||||
)
|
||||
|
||||
func Test_down_dont_delete_cluster(t *testing.T) {
|
||||
func TestDownDontDeleteCluster(t *testing.T) {
|
||||
ctrl := gomock.NewController(t)
|
||||
defer ctrl.Finish()
|
||||
m := mock.NewMockAPI(ctrl)
|
||||
|
@ -23,7 +23,7 @@ func Test_down_dont_delete_cluster(t *testing.T) {
|
|||
c.ComposeDown("test_project", false)
|
||||
}
|
||||
|
||||
func Test_down_delete_cluster(t *testing.T) {
|
||||
func TestDownDeleteCluster(t *testing.T) {
|
||||
ctrl := gomock.NewController(t)
|
||||
defer ctrl.Finish()
|
||||
m := mock.NewMockAPI(ctrl)
|
||||
|
|
|
@ -93,14 +93,14 @@ func (s sdk) GetDefaultVPC() (string, error) {
|
|||
return *vpcs.Vpcs[0].VpcId, nil
|
||||
}
|
||||
|
||||
func (s sdk) GetSubNets(vpc string) ([]string, error) {
|
||||
func (s sdk) GetSubNets(vpcID string) ([]string, error) {
|
||||
logrus.Debug("Retrieve SubNets")
|
||||
subnets, err := s.EC2.DescribeSubnets(&ec2.DescribeSubnetsInput{
|
||||
DryRun: nil,
|
||||
Filters: []*ec2.Filter{
|
||||
{
|
||||
Name: aws.String("vpc-id"),
|
||||
Values: []*string{aws.String(vpc)},
|
||||
Values: []*string{aws.String(vpcID)},
|
||||
},
|
||||
{
|
||||
Name: aws.String("default-for-az"),
|
||||
|
|
|
@ -16,6 +16,9 @@ func (c *client) ComposeUp(project *compose.Project) error {
|
|||
c.api.CreateCluster(c.Cluster)
|
||||
}
|
||||
update, err := c.api.StackExists(project.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if update {
|
||||
return fmt.Errorf("we do not (yet) support updating an existing CloudFormation stack")
|
||||
}
|
||||
|
@ -31,6 +34,9 @@ func (c *client) ComposeUp(project *compose.Project) error {
|
|||
}
|
||||
|
||||
err = c.api.DescribeStackEvents(project.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO monitor progress
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue