This is usefull for scripting.
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -435,6 +436,10 @@ var AppSecretLsCommand = &cobra.Command{
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort secrets to ensure reproducible output
|
||||||
|
sort.Slice(secStats, func(i, j int) bool {
|
||||||
|
return secStats[i].LocalName < secStats[j].LocalName
|
||||||
|
})
|
||||||
var rows [][]string
|
var rows [][]string
|
||||||
for _, secStat := range secStats {
|
for _, secStat := range secStats {
|
||||||
row := []string{
|
row := []string{
|
||||||
|
@ -357,6 +357,12 @@ teardown(){
|
|||||||
| jq -r ".[] | select(.name==\"test_pass_two\") | .version"'
|
| jq -r ".[] | select(.name==\"test_pass_two\") | .version"'
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --partial 'v1'
|
assert_output --partial 'v1'
|
||||||
|
|
||||||
|
# Can always expect the secret at this position
|
||||||
|
run bash -c '$ABRA app secret ls "$TEST_APP_DOMAIN" --machine \
|
||||||
|
| jq -r ".[1] | .name"'
|
||||||
|
assert_success
|
||||||
|
assert_output --partial 'test_pass_two'
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "ls: bail if unstaged changes and no --chaos" {
|
@test "ls: bail if unstaged changes and no --chaos" {
|
||||||
|
Reference in New Issue
Block a user