Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conversion_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func ActualLRPNetInfoFromContainer(container executor.Container) (*models.Actual
preferredAddress = models.ActualLRPNetInfo_PreferredAddressInstance
}

actualLRPNetInfo := models.NewActualLRPNetInfo(container.ExternalIP, container.InternalIP, preferredAddress, ports...)
actualLRPNetInfo := models.NewActualLRPNetInfoWithIPv6(container.ExternalIP, container.InternalIP, container.InternalIPv6, preferredAddress, ports...)

err := actualLRPNetInfo.Validate()
if err != nil {
Expand Down
11 changes: 11 additions & 0 deletions conversion_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,17 @@ var _ = Describe("Resources", func() {
Expect(*lrpNetInfo).To(Equal(expectedNetInfo))
})

Context("when the container has an IPv6 address", func() {
BeforeEach(func() {
container.InternalIPv6 = "fd00::1"
})

It("includes the IPv6 address in the net info", func() {
Expect(netInfoConversionErr).NotTo(HaveOccurred())
Expect(lrpNetInfo.InstanceIpv6Address).To(Equal("fd00::1"))
})
})

Context("when advertisePreferenceForInstanceAddress set to false", func() {
BeforeEach(func() {
container.AdvertisePreferenceForInstanceAddress = false
Expand Down