Ejemplo n.º 1
0
func createDefaultSearchSpec(c *cli.Context) *utils.SpecFiles {
	pattern := c.Args().Get(0)
	props := c.String("props")
	recursive := cliutils.GetBoolFlagValue(c, "recursive", true)

	return utils.CreateSpec(pattern, "", props, recursive, false, false)
}
Ejemplo n.º 2
0
func createDefaultDownloadSpec(c *cli.Context) *utils.SpecFiles {
	pattern := strings.TrimPrefix(c.Args().Get(0), "/")
	target := c.Args().Get(1)
	props := c.String("props")
	recursive := cliutils.GetBoolFlagValue(c, "recursive", true)
	flat := cliutils.GetBoolFlagValue(c, "flat", false)

	return utils.CreateSpec(pattern, target, props, recursive, flat, false)
}
Ejemplo n.º 3
0
func isExistInArtifactoryByProps(expected []string, pattern, props string, t *testing.T) {
	searchFlags := new(commands.SearchFlags)
	searchFlags.ArtDetails = artifactoryDetails
	searchSpec := utils.CreateSpec(pattern, "", props, true, false, false)
	results, err := commands.Search(searchSpec, searchFlags)
	if err != nil {
		t.Error(err)
	}
	tests.CompareExpectedVsActuals(expected, results, t)
}