boship.NewSimpleInterfaceAddress("eth0", "1.2.3.5"), } }) It("fails", func() { err := interfaceAddrsValidator.Validate([]boship.InterfaceAddress{ boship.NewSimpleInterfaceAddress("eth0", "1.2.3.4"), }) Expect(err).To(HaveOccurred()) Expect(err.Error()).To(ContainSubstring("Validating network interface 'eth0' IP addresses, expected: '1.2.3.4', actual: '1.2.3.5'")) }) }) Context("when validating manual networks fails", func() { BeforeEach(func() { interfaceAddrsProvider.GetErr = errors.New("interface-error") }) It("fails", func() { err := interfaceAddrsValidator.Validate([]boship.InterfaceAddress{ boship.NewSimpleInterfaceAddress("eth0", "1.2.3.4"), }) Expect(err).To(HaveOccurred()) Expect(err.Error()).To(ContainSubstring("interface-error")) }) }) Context("when interface is not configured", func() { BeforeEach(func() { interfaceAddrsProvider.GetInterfaceAddresses = []boship.InterfaceAddress{ boship.NewSimpleInterfaceAddress("another-ethstatic", "1.2.3.5"),