Skip to content

Commit

Permalink
fix(k8s): add missing command argument to helm module test schema
Browse files Browse the repository at this point in the history
We were already accounting for this in the code, was just missing
from the validation schema.
  • Loading branch information
edvald committed Oct 9, 2019
1 parent 19fa435 commit c5fc53a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
29 changes: 29 additions & 0 deletions docs/reference/module-types/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,25 @@ tests:
- my-server.js
```

### `tests[].command[]`

[tests](#tests) > command

The command/entrypoint used to run the test inside the container.

| Type | Required |
| --------------- | -------- |
| `array[string]` | No |

Example:

```yaml
tests:
- command:
- /bin/sh
- '-c'
```

### `tests[].args[]`

[tests](#tests) > args
Expand All @@ -674,6 +693,15 @@ The arguments to pass to the pod used for testing.
| --------------- | -------- |
| `array[string]` | No |

Example:

```yaml
tests:
- args:
- npm
- test
```

### `tests[].env`

[tests](#tests) > env
Expand Down Expand Up @@ -791,6 +819,7 @@ tests:
containerName:
containerModule:
hotReloadArgs:
command:
args:
env: {}
timeout: 300
Expand Down
6 changes: 5 additions & 1 deletion garden-service/src/plugins/kubernetes/helm/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ export const execTestSchema = baseTestSpecSchema
If not specified, the \`serviceResource\` configured on the module will be used. If neither is specified,
an error will be thrown.`,
),
command: joi.array().items(joi.string())
.description("The command/entrypoint used to run the test inside the container.")
.example([commandExample, {}]),
args: joi.array().items(joi.string())
.description("The arguments to pass to the pod used for testing."),
.description("The arguments to pass to the pod used for testing.")
.example([["npm", "test"], {}]),
env: containerEnvVarsSchema,
})

Expand Down

0 comments on commit c5fc53a

Please sign in to comment.