mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Remove now-unused instanceId parameter from newAwsCloud
This commit is contained in:
parent
4e176771b6
commit
5a887e83e7
@ -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) {
|
|||||||
|
|
||||||
// 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) {
|
|||||||
|
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user