mirror of https://github.com/k3s-io/k3s
Remove now-unused instanceId parameter from newAwsCloud
parent
4e176771b6
commit
5a887e83e7
|
@ -170,7 +170,7 @@ func (s *goamzEC2) DeleteVolume(volumeId string) (resp *ec2.SimpleResp, err erro
|
|||
func init() {
|
||||
cloudprovider.RegisterCloudProvider("aws", func(config io.Reader) (cloudprovider.Interface, error) {
|
||||
metadata := &goamzMetadata{}
|
||||
return newAWSCloud(config, getAuth, "", metadata)
|
||||
return newAWSCloud(config, getAuth, metadata)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ func getAvailabilityZone(metadata AWSMetadata) (string, error) {
|
|||
|
||||
// newAWSCloud creates a new instance of AWSCloud.
|
||||
// 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)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read AWS cloud provider config file: %v", err)
|
||||
|
|
|
@ -143,8 +143,7 @@ func TestNewAWSCloud(t *testing.T) {
|
|||
|
||||
for _, test := range tests {
|
||||
t.Logf("Running test case %s", test.name)
|
||||
selfInstanceId := "self-instance"
|
||||
c, err := newAWSCloud(test.reader, test.authFunc, selfInstanceId, test.metadata)
|
||||
c, err := newAWSCloud(test.reader, test.authFunc, test.metadata)
|
||||
if test.expectError {
|
||||
if err == nil {
|
||||
t.Errorf("Should error for case %s", test.name)
|
||||
|
|
Loading…
Reference in New Issue