Expect(err).ToNot(HaveOccurred()) Expect(fakeFileSystem.FileExists("fake-blobstore-file-path")).To(BeFalse()) }) It("logs when the dns blob file can't be deleted", func() { fakeFileSystem.RemoveAllStub = func(path string) error { if path == "fake-blobstore-file-path" { return errors.New("fake-file-path-error") } return nil } _, err := action.Run("fake-blobstore-id", "fake-fingerprint", 2) Expect(err).ToNot(HaveOccurred()) tag, message, _ := logger.ErrorArgsForCall(0) Expect(tag).To(Equal("Sync DNS action")) Expect(message).To(Equal("Failed to remove dns blob file at path 'fake-blobstore-file-path'")) }) It("saves DNS records to the platform", func() { response, err := action.Run("fake-blobstore-id", "fake-fingerprint", 2) Expect(err).ToNot(HaveOccurred()) Expect(response).To(Equal("synced")) Expect(fakePlatform.SaveDNSRecordsError).To(BeNil()) Expect(fakePlatform.SaveDNSRecordsDNSRecords).To(Equal(boshsettings.DNSRecords{ Version: 2, Records: [][2]string{ {"fake-ip0", "fake-name0"}, {"fake-ip1", "fake-name1"},