3 files changed
+62
-3
No files matched your search
@@ -2,7 +2,7 @@ package storage
|
|||||||
|
|
||||||
import "github.com/dokku/dokku/plugins/common"
|
import "github.com/dokku/dokku/plugins/common"
|
||||||
|
|
||||||
func ReportSingleApp(appName string, infoFlag string, format string) error {
|
func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||||
if err := common.VerifyAppName(appName); err != nil {
|
if err := common.VerifyAppName(appName); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ func main() {
|
|||||||
mountPath := args.Arg(1)
|
mountPath := args.Arg(1)
|
||||||
err = storage.CommandMount(appName, mountPath)
|
err = storage.CommandMount(appName, mountPath)
|
||||||
case "report":
|
case "report":
|
||||||
args := flag.NewFlagSet("scheduler-k3s:report", flag.ExitOnError)
|
args := flag.NewFlagSet("storage:report", flag.ExitOnError)
|
||||||
format := args.String("format", "stdout", "format: [ stdout | json ]")
|
format := args.String("format", "stdout", "format: [ stdout | json ]")
|
||||||
osArgs, infoFlag, flagErr := common.ParseReportArgs("scheduler-k3s", os.Args[2:])
|
osArgs, infoFlag, flagErr := common.ParseReportArgs("storage", os.Args[2:])
|
||||||
if flagErr == nil {
|
if flagErr == nil {
|
||||||
args.Parse(osArgs)
|
args.Parse(osArgs)
|
||||||
appName := args.Arg(0)
|
appName := args.Arg(0)
|
||||||
|
|||||||
@@ -138,3 +138,62 @@ teardown() {
|
|||||||
assert_output_contains "You haven't deployed any applications yet"
|
assert_output_contains "You haven't deployed any applications yet"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(report) storage report when apps exist" {
|
||||||
|
run create_app
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku report $TEST_APP"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
plugins=(
|
||||||
|
app-json
|
||||||
|
apps
|
||||||
|
builder
|
||||||
|
builder-dockerfile
|
||||||
|
builder-herokuish
|
||||||
|
builder-lambda
|
||||||
|
builder-nixpacks
|
||||||
|
builder-railpack
|
||||||
|
builder-pack
|
||||||
|
buildpacks
|
||||||
|
caddy
|
||||||
|
certs
|
||||||
|
checks
|
||||||
|
cron
|
||||||
|
docker-options
|
||||||
|
domains
|
||||||
|
git
|
||||||
|
haproxy
|
||||||
|
logs
|
||||||
|
network
|
||||||
|
nginx
|
||||||
|
openresty
|
||||||
|
ports
|
||||||
|
proxy
|
||||||
|
ps
|
||||||
|
registry
|
||||||
|
resource
|
||||||
|
scheduler
|
||||||
|
scheduler-docker-local
|
||||||
|
scheduler-k3s
|
||||||
|
storage
|
||||||
|
traefik
|
||||||
|
)
|
||||||
|
|
||||||
|
for plugin in "${plugins[@]}"; do
|
||||||
|
run /bin/bash -c "dokku $plugin:report 2>&1"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku $plugin:report $TEST_APP 2>&1"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
done
|
||||||
|
}
|
||||||
Reference in new issue
Block a user