Skip to content

Commit

Permalink
fix: test fixes and docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
10ko authored and thsig committed Jul 10, 2019
1 parent df31b77 commit 7616fa3
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 25 deletions.
6 changes: 3 additions & 3 deletions docs/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Examples:
garden dev
garden dev --hot=foo-service,bar-service # enable hot reloading for foo-service and bar-service
garden dev --hot=* # enable hot reloading for all compatible services
garden dev --skip-tests=foo-service # skip running any tests
garden dev --skip-tests= # skip running any tests
garden dev --name integ # run all tests with the name 'integ' in the project
garden test --name integ* # run all tests with the name starting with 'integ' in the project

Expand All @@ -204,8 +204,8 @@ Examples:
| Argument | Alias | Type | Description |
| -------- | ----- | ---- | ----------- |
| `--hot-reload` | `-hot` | array:string | The name(s) of the service(s) to deploy with hot reloading enabled. Use comma as a separator to specify multiple services. Use * to deploy all services with hot reloading enabled (ignores services belonging to modules that don't support or haven't configured hot reloading).
| `--skip-tests` | | boolean | Disable running the tests
| `--test-names` | `-tn` | array:string | The name(s) of the module(s) to test (skip to test all modules). Accepts glob patterns (e.g. integ* would run both 'integ' and 'integration')
| `--skip-tests` | | boolean | Disable running the tests.
| `--test-names` | `-tn` | array:string | Filter the tests to run by test name across all modules (leave unset to run all tests). Accepts glob patterns (e.g. integ* would run both 'integ' and 'integration').

### garden exec

Expand Down
42 changes: 21 additions & 21 deletions garden-service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion garden-service/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const devOpts = {
help: "Disable running the tests.",
}),
"test-names": new StringsParameter({
help: "The name(s) of the module(s) to test (skip to test all modules). " +
help: "Filter the tests to run by test name across all modules (leave unset to run all tests). " +
"Accepts glob patterns (e.g. integ* would run both 'integ' and 'integration').",
alias: "tn",
}),
Expand Down
12 changes: 12 additions & 0 deletions garden-service/test/unit/src/config-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ describe("ConfigGraph", () => {
moduleName: "module-c",
key: "test.module-c.unit",
},
{
type: "test",
name: "integ",
moduleName: "module-c",
key: "test.module-c.integ",
},
{
type: "run",
name: "task-c",
Expand All @@ -229,6 +235,12 @@ describe("ConfigGraph", () => {
moduleName: "module-a",
key: "test.module-a.unit",
},
{
type: "test",
name: "integration",
moduleName: "module-a",
key: "test.module-a.integration",
},
{
type: "run",
name: "task-a",
Expand Down
4 changes: 4 additions & 0 deletions garden-service/test/unit/src/config/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ describe("loadConfig", () => {
tests: [{
name: "unit",
command: ["echo", "OK"],
},
{
name: "integration",
command: ["echo", "OK"],
}],
},

Expand Down

0 comments on commit 7616fa3

Please sign in to comment.