}) It("excludes files that were in the response but not in the request", func() { setupTestServer(matchResourceRequestImbalanced) matchedFiles, err := repo.GetApplicationFiles([]resources.AppFileResource{file1, file4}) Expect(matchedFiles).To(Equal([]resources.AppFileResource{file4})) Expect(err).NotTo(HaveOccurred()) }) }) }) var matchedResources = testnet.RemoveWhiteSpaceFromBody(`[ { "sha1": "d9c3a51de5c89c11331d3b90b972789f1a14699a", "size": 59 }, { "sha1": "345f999aef9070fb9a608e65cf221b7038156b6d", "size": 229 } ]`) var unmatchedResources = testnet.RemoveWhiteSpaceFromBody(`[ { "sha1": "2474735f5163ba7612ef641f438f4b5bee00127b", "size": 51, "fn": "app.rb", "mode":"" }, { "sha1": "f097424ce1fa66c6cb9f5e8a18c317376ec12e05", "size": 70,
Expect(err).NotTo(HaveOccurred()) Expect(reportedFileCount).To(Equal(uint64(0))) Expect(reportedUploadSize).To(Equal(uint64(0))) Expect(reportedFilePath).To(Equal(emptyDir)) }) }) }) }) var matchedResources = testnet.RemoveWhiteSpaceFromBody(`[ { "fn": "app.rb", "sha1": "2474735f5163ba7612ef641f438f4b5bee00127b", "size": 51 }, { "fn": "config.ru", "sha1": "f097424ce1fa66c6cb9f5e8a18c317376ec12e05", "size": 70 } ]`) var uploadApplicationRequest = testapi.NewCloudControllerTestRequest(testnet.TestRequest{ Method: "PUT", Path: "/v2/apps/my-cool-app-guid/bits", Matcher: uploadBodyMatcher, Response: testnet.TestResponse{ Status: http.StatusCreated, Body: ` { "metadata":{