Skip to content

Commit

Permalink
Support static tests (#141)
Browse files Browse the repository at this point in the history
* Support static tests

* Update CHANGELOG
  • Loading branch information
mtojek authored Mar 1, 2021
1 parent 5411166 commit 584b422
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/go/internal/spec/statik.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
skip:
reason: Test was skipped to test skipped test feature in spec.
link: https://github.com/elastic/integrations/issues/0
4 changes: 3 additions & 1 deletion versions/1/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@
- description: Deprecate JSON-formatted pipeline test configs in favor of YAML-formatted ones
type: enhancement
link: https://github.com/elastic/package-spec/pull/139

- description: Support static tests
type: enhancement
link: https://github.com/elastic/package-spec/pull/141
5 changes: 5 additions & 0 deletions versions/1/data_stream/_dev/test/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ spec:
name: pipeline
required: false
$ref: "./pipeline/spec.yml"
- description: Folder containing tests of static resources
type: folder
name: static
required: false
$ref: "./static/spec.yml"
- description: Folder containing system tests
type: folder
name: system
Expand Down
10 changes: 10 additions & 0 deletions versions/1/data_stream/_dev/test/static/config.spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
##
## Describes the specification for a system test configuration file
##
spec:
# Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability
type: object
additionalProperties: true
properties:
skip:
$ref: "./../skip.spec.yml#/definitions/skip"
10 changes: 10 additions & 0 deletions versions/1/data_stream/_dev/test/static/spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
spec:
additionalContents: false
contents:
- description: Configuration of test case in yaml format.
type: file
pattern: '^test-[a-z0-9_.-]+-config.yml$'
contentMediaType: "application/x-yaml"
required: false
$ref: "./config.spec.yml"

0 comments on commit 584b422

Please sign in to comment.