Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion internal/projectinit/projectinit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package projectinit
import (
"os"
"path/filepath"
"strings"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -38,7 +39,15 @@ func TestRunCreatesScaffold(t *testing.T) {
assert.Contains(t, ignore, "volcano.env")

readme := readProjectFile(t, dir, filepath.Join("volcano", "README.md"))
assert.Contains(t, readme, "If this project includes volcano/volcano-config.yaml")
assert.Contains(t, readme, "If this project includes volcano/functions:\n\n volcano functions deploy --all")
assert.Contains(t, readme, "If this project includes volcano/functions:\n\n volcano cloud functions deploy --all")
assert.Contains(t, readme, "If this project includes volcano/volcano-config.yaml:\n\n volcano config deploy")
assert.Contains(t, readme, "If this project includes volcano/volcano-config.yaml:\n\n volcano cloud config deploy")
assert.Equal(t, 1, strings.Count(readme, "volcano functions deploy --all"))
assert.Equal(t, 1, strings.Count(readme, "volcano cloud functions deploy --all"))
assert.Equal(t, 1, strings.Count(readme, "volcano config deploy"))
assert.Equal(t, 1, strings.Count(readme, "volcano cloud config deploy"))
assert.NotContains(t, readme, "configuration, functions, migrations")
}

func TestRunRejectsInvalidStarterNames(t *testing.T) {
Expand Down
10 changes: 8 additions & 2 deletions internal/projectinit/starters/base/volcano/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Volcano

This directory contains Volcano configuration, functions, migrations, and local variables.
This directory contains Volcano migrations and local variables.

Local development:

volcano start
volcano variables deploy
volcano functions deploy --all
volcano migrations deploy --all -d app

If this project includes volcano/functions:

volcano functions deploy --all

If this project includes volcano/volcano-config.yaml:

volcano config deploy
Expand All @@ -18,6 +21,9 @@ Cloud deployment:
volcano login
volcano use <project-id-or-name>
volcano cloud variables deploy

If this project includes volcano/functions:

volcano cloud functions deploy --all

If this project includes volcano/volcano-config.yaml:
Expand Down
Loading