(appName string)
| 35 | } |
| 36 | |
| 37 | func GetFirstAppPackageGuid(appName string) string { |
| 38 | commandName := "v3-packages" |
| 39 | if V7 { |
| 40 | commandName = "packages" |
| 41 | } |
| 42 | session := CF(commandName, appName) |
| 43 | Eventually(session).Should(Exit(0)) |
| 44 | |
| 45 | myRegexp, err := regexp.Compile(GUIDRegex) |
| 46 | Expect(err).NotTo(HaveOccurred()) |
| 47 | matches := myRegexp.FindAll(session.Out.Contents(), -1) |
| 48 | packageGUID := matches[3] |
| 49 | |
| 50 | return string(packageGUID) |
| 51 | } |
| 52 | |
| 53 | func downloadFirstAppPackage(appName string, tmpZipFilepath string) { |
| 54 | appGUID := GetFirstAppPackageGuid(appName) |
no test coverage detected