fix some vets
This commit is contained in:
		@@ -76,12 +76,12 @@ func (r *Route53APIStub) ChangeResourceRecordSets(input *route53.ChangeResourceR
 | 
				
			|||||||
		switch *change.Action {
 | 
							switch *change.Action {
 | 
				
			||||||
		case route53.ChangeActionCreate:
 | 
							case route53.ChangeActionCreate:
 | 
				
			||||||
			if _, found := recordSets[*change.ResourceRecordSet.Name]; found {
 | 
								if _, found := recordSets[*change.ResourceRecordSet.Name]; found {
 | 
				
			||||||
				return nil, fmt.Errorf("Attempt to create duplicate rrset %s", change.ResourceRecordSet.Name) // TODO: Return AWS errors with codes etc
 | 
									return nil, fmt.Errorf("Attempt to create duplicate rrset %s", *change.ResourceRecordSet.Name) // TODO: Return AWS errors with codes etc
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			recordSets[*change.ResourceRecordSet.Name] = append(recordSets[*change.ResourceRecordSet.Name], change.ResourceRecordSet)
 | 
								recordSets[*change.ResourceRecordSet.Name] = append(recordSets[*change.ResourceRecordSet.Name], change.ResourceRecordSet)
 | 
				
			||||||
		case route53.ChangeActionDelete:
 | 
							case route53.ChangeActionDelete:
 | 
				
			||||||
			if _, found := recordSets[*change.ResourceRecordSet.Name]; !found {
 | 
								if _, found := recordSets[*change.ResourceRecordSet.Name]; !found {
 | 
				
			||||||
				return nil, fmt.Errorf("Attempt to delete non-existant rrset %s", change.ResourceRecordSet.Name) // TODO: Check other fields too
 | 
									return nil, fmt.Errorf("Attempt to delete non-existant rrset %s", *change.ResourceRecordSet.Name) // TODO: Check other fields too
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			delete(recordSets, *change.ResourceRecordSet.Name)
 | 
								delete(recordSets, *change.ResourceRecordSet.Name)
 | 
				
			||||||
		case route53.ChangeActionUpsert:
 | 
							case route53.ChangeActionUpsert:
 | 
				
			||||||
@@ -102,7 +102,7 @@ func (r *Route53APIStub) ListHostedZones(*route53.ListHostedZonesInput) (*route5
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func (r *Route53APIStub) CreateHostedZone(input *route53.CreateHostedZoneInput) (*route53.CreateHostedZoneOutput, error) {
 | 
					func (r *Route53APIStub) CreateHostedZone(input *route53.CreateHostedZoneInput) (*route53.CreateHostedZoneOutput, error) {
 | 
				
			||||||
	if _, ok := r.zones[*input.Name]; ok {
 | 
						if _, ok := r.zones[*input.Name]; ok {
 | 
				
			||||||
		return nil, fmt.Errorf("Error creating hosted DNS zone: %s already exists", input.Name)
 | 
							return nil, fmt.Errorf("Error creating hosted DNS zone: %s already exists", *input.Name)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	r.zones[*input.Name] = &route53.HostedZone{
 | 
						r.zones[*input.Name] = &route53.HostedZone{
 | 
				
			||||||
		Id:   input.Name,
 | 
							Id:   input.Name,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -107,7 +107,7 @@ func NewFakeInterface() (dnsprovider.Interface, error) {
 | 
				
			|||||||
	interface_ := newInterfaceWithStub("", service)
 | 
						interface_ := newInterfaceWithStub("", service)
 | 
				
			||||||
	zones := service.ManagedZones_
 | 
						zones := service.ManagedZones_
 | 
				
			||||||
	// Add a fake zone to test against.
 | 
						// Add a fake zone to test against.
 | 
				
			||||||
	zone := &stubs.ManagedZone{zones, "example.com", []stubs.ResourceRecordSet{}}
 | 
						zone := &stubs.ManagedZone{Service: zones, Name_: "example.com", Rrsets: []stubs.ResourceRecordSet{}}
 | 
				
			||||||
	call := zones.Create(interface_.project(), zone)
 | 
						call := zones.Create(interface_.project(), zone)
 | 
				
			||||||
	if _, err := call.Do(); err != nil {
 | 
						if _, err := call.Do(); err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user