Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Support recordings as data input for tests #7

Open
gpestana opened this issue Aug 30, 2017 · 2 comments
Open

[feature] Support recordings as data input for tests #7

gpestana opened this issue Aug 30, 2017 · 2 comments

Comments

@gpestana
Copy link
Owner

gpestana commented Aug 30, 2017

Kapacitor recordings are an easy way to replay a set of data against a task. Kapacitor-unit must support recordings as data input for the tests.

  • The recordings must be saved previously in the kapacitor instance used to run the tests;
  • A recording is identified by an unique ID. The unique ID is generated by kapacitor when the recording is created;
  • The recording ID must be provided in the configuration file:
  - name: Alert weather:: warning
    task_script: alert.tick
    db: weather
    rp: default 
    recording_id: e24db07d-1646-4bb3-a445-828f5049bea0
    expects:
      ok: 0
      warn: 1
      crit: 0

When recording is provided, there cannot be a data field in the test configuration file. If both fields exist, the test configuration is considered invalid. The test will not run and the test output message should describe the invalid error.

gpestana added a commit that referenced this issue Aug 30, 2017
Adds validation step before loading the tast and data into influx. If there is
recording_id and data in the test configuration, the configuration test is
considered invalid. In that case, the test result will print the reason for the
test to be invalid.

Related to #7
@gpestana
Copy link
Owner Author

gpestana commented Dec 4, 2017

This can be finished now after the v1.4.0-rc1 [2017-11-09] release of kapacitor. The influxdata/kapacitor#1575 PR has made possible to fetch the results of the task after it has finished.

@gpestana
Copy link
Owner Author

gpestana commented Dec 4, 2017

But the v1.4 is not available in docker hub yet. Let's wait for the official release so we can get this feature in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant