Commit 5a887e83 authored by Justin Santa Barbara's avatar Justin Santa Barbara

Remove now-unused instanceId parameter from newAwsCloud

parent 4e176771
...@@ -170,7 +170,7 @@ func (s *goamzEC2) DeleteVolume(volumeId string) (resp *ec2.SimpleResp, err erro ...@@ -170,7 +170,7 @@ func (s *goamzEC2) DeleteVolume(volumeId string) (resp *ec2.SimpleResp, err erro
func init() { func init() {
cloudprovider.RegisterCloudProvider("aws", func(config io.Reader) (cloudprovider.Interface, error) { cloudprovider.RegisterCloudProvider("aws", func(config io.Reader) (cloudprovider.Interface, error) {
metadata := &goamzMetadata{} metadata := &goamzMetadata{}
return newAWSCloud(config, getAuth, "", metadata) return newAWSCloud(config, getAuth, metadata)
}) })
} }
...@@ -219,7 +219,7 @@ func getAvailabilityZone(metadata AWSMetadata) (string, error) { ...@@ -219,7 +219,7 @@ func getAvailabilityZone(metadata AWSMetadata) (string, error) {
// newAWSCloud creates a new instance of AWSCloud. // newAWSCloud creates a new instance of AWSCloud.
// authFunc and instanceId are primarily for tests // authFunc and instanceId are primarily for tests
func newAWSCloud(config io.Reader, authFunc AuthFunc, instanceId string, metadata AWSMetadata) (*AWSCloud, error) { func newAWSCloud(config io.Reader, authFunc AuthFunc, metadata AWSMetadata) (*AWSCloud, error) {
cfg, err := readAWSCloudConfig(config, metadata) cfg, err := readAWSCloudConfig(config, metadata)
if err != nil { if err != nil {
return nil, fmt.Errorf("unable to read AWS cloud provider config file: %v", err) return nil, fmt.Errorf("unable to read AWS cloud provider config file: %v", err)
......
...@@ -143,8 +143,7 @@ func TestNewAWSCloud(t *testing.T) { ...@@ -143,8 +143,7 @@ func TestNewAWSCloud(t *testing.T) {
for _, test := range tests { for _, test := range tests {
t.Logf("Running test case %s", test.name) t.Logf("Running test case %s", test.name)
selfInstanceId := "self-instance" c, err := newAWSCloud(test.reader, test.authFunc, test.metadata)
c, err := newAWSCloud(test.reader, test.authFunc, selfInstanceId, test.metadata)
if test.expectError { if test.expectError {
if err == nil { if err == nil {
t.Errorf("Should error for case %s", test.name) t.Errorf("Should error for case %s", test.name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment