forked from toolshed/abra
test: int suite fixes
This commit is contained in:
@ -64,7 +64,7 @@ EXAMPLE:
|
||||
app.Recipe.Version = specificVersion
|
||||
}
|
||||
|
||||
if specificVersion == "" && app.Recipe.Version != "" {
|
||||
if specificVersion == "" && app.Recipe.Version != "" && !internal.Chaos {
|
||||
log.Debugf("retrieved %s as version from env file", app.Recipe.Version)
|
||||
specificVersion = app.Recipe.Version
|
||||
}
|
||||
|
@ -160,6 +160,7 @@ var appSecretInsertCommand = cli.Command{
|
||||
internal.PassFlag,
|
||||
internal.FileFlag,
|
||||
internal.TrimFlag,
|
||||
internal.ChaosFlag,
|
||||
},
|
||||
Before: internal.SubCommandBefore,
|
||||
ArgsUsage: "<domain> <secret-name> <version> <data>",
|
||||
|
@ -61,7 +61,6 @@ var recipeVersionCommand = cli.Command{
|
||||
log.Fatalf("%s has no published versions?", recipe.Name)
|
||||
}
|
||||
|
||||
var allRows [][]string
|
||||
for i := len(recipeMeta.Versions) - 1; i >= 0; i-- {
|
||||
table, err := formatter.CreateTable()
|
||||
if err != nil {
|
||||
@ -71,6 +70,7 @@ var recipeVersionCommand = cli.Command{
|
||||
table.Headers("SERVICE", "NAME", "TAG")
|
||||
|
||||
for version, meta := range recipeMeta.Versions[i] {
|
||||
var allRows [][]string
|
||||
var rows [][]string
|
||||
|
||||
for service, serviceMeta := range meta {
|
||||
@ -86,6 +86,18 @@ var recipeVersionCommand = cli.Command{
|
||||
fmt.Println(table)
|
||||
log.Infof("VERSION: %s", version)
|
||||
fmt.Println()
|
||||
continue
|
||||
}
|
||||
|
||||
if internal.MachineReadable {
|
||||
sort.Slice(allRows, sortServiceByName(allRows))
|
||||
headers := []string{"VERSION", "SERVICE", "NAME", "TAG"}
|
||||
out, err := formatter.ToJSON(headers, allRows)
|
||||
if err != nil {
|
||||
log.Fatal("unable to render to JSON: %s", err)
|
||||
}
|
||||
fmt.Println(out)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,17 +108,6 @@ var recipeVersionCommand = cli.Command{
|
||||
}
|
||||
}
|
||||
|
||||
if internal.MachineReadable {
|
||||
sort.Slice(allRows, sortServiceByName(allRows))
|
||||
headers := []string{"VERSION", "SERVICE", "NAME", "TAG"}
|
||||
out, err := formatter.ToJSON(headers, allRows)
|
||||
if err != nil {
|
||||
log.Fatal("unable to render to JSON: %s", err)
|
||||
}
|
||||
fmt.Println(out)
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user