copilot review
This commit is contained in:
1 parent
2cc2c2991f
commit
f17b055476
3 files changed
+7
-7
No files matched your search
@@ -669,7 +669,7 @@ func awsInstanceToHost(instance types.Instance, catalogAttributes *CatalogAttrib
|
||||
}
|
||||
}
|
||||
|
||||
// First lets get the instance Private IPv4/DNS, Public IPv4/DNS, and IPv6 address
|
||||
// First let's get the instance's Private IPv4/DNS, Public IPv4/DNS, and IPv6 addresses
|
||||
result.IpAddresses = appendDistinct(result.IpAddresses, instance.PrivateIpAddress, instance.PublicIpAddress, instance.Ipv6Address)
|
||||
result.DnsNames = appendDistinct(result.DnsNames, instance.PrivateDnsName, instance.PublicDnsName)
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ func TestHostPlugin(t *testing.T) {
|
||||
// TODO: add OnDeleteSet if it needs to be implemented
|
||||
}
|
||||
|
||||
// finally lets test instance_address_only catalog attribute correctly syncs only instance addresses
|
||||
// finally lets test instance_addresses_only catalog attribute correctly syncs only instance addresses
|
||||
testInstanceAddressesOnlyListHosts(ctx, t, p, tf, region, keyid, secret)
|
||||
}
|
||||
|
||||
@@ -466,12 +466,13 @@ func testInstanceAddressesOnlyListHosts(ctx context.Context, t *testing.T, p *ho
|
||||
secondaryAddresses, err := tf.GetOutputMap("multi_address_secondary_addresses")
|
||||
require.NoError(t, err)
|
||||
|
||||
var primary, secondary []string
|
||||
var primary, allAddresses []string
|
||||
for _, addr := range primaryAddresses {
|
||||
primary = append(primary, addr.(string))
|
||||
}
|
||||
allAddresses = append(allAddresses, primary...)
|
||||
for _, addr := range secondaryAddresses {
|
||||
secondary = append(secondary, addr.(string))
|
||||
allAddresses = append(allAddresses, addr.(string))
|
||||
}
|
||||
|
||||
cases := []struct {
|
||||
@@ -481,7 +482,7 @@ func testInstanceAddressesOnlyListHosts(ctx context.Context, t *testing.T, p *ho
|
||||
}{
|
||||
{
|
||||
name: "all addresses",
|
||||
expectedIPs: append(primary, secondary...),
|
||||
expectedIPs: allAddresses,
|
||||
},
|
||||
{
|
||||
name: "instance addresses only",
|
||||
|
||||
Vendored
+1
-2
@@ -33,7 +33,7 @@ resource "aws_subnet" "subnet" {
|
||||
assign_ipv6_address_on_creation = true
|
||||
}
|
||||
|
||||
# Need to add a gateway for public IP addr assignments
|
||||
# Need to add a gateway for public IP addr assignments
|
||||
resource "aws_internet_gateway" "igw" {
|
||||
vpc_id = aws_vpc.vpc.id
|
||||
}
|
||||
@@ -178,4 +178,3 @@ output "multi_address_secondary_addresses" {
|
||||
secondary_eni_ipv6 = tolist(aws_network_interface.multi_address_secondary_eni.ipv6_addresses)[0]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user