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

Idea: Write "JSON" Schemas for each test format and test on CI #11

Open
kylef opened this issue Oct 30, 2017 · 1 comment
Open

Idea: Write "JSON" Schemas for each test format and test on CI #11

kylef opened this issue Oct 30, 2017 · 1 comment

Comments

@kylef
Copy link

kylef commented Oct 30, 2017

I've done similar in the past where I've used a JSON Schema to provide a full schema for other files to be used during CI. This would give us a few benefits:

  • As documentation for the format of each file, can also contain description of the format.
  • Can be used to test that the test files are correct during any changes in CI. This will prevent any unintentional breakage cause by PRs.

As an example (schemas/userhost-split.yaml):

type: object
properties:
  tests:
    type: array
    items:
      '$ref': '#!/definitions/test'

definitions:
  test:
    type: object
    properties:
      source:
        type: string
        description: source is the usthost
      atoms:
        type: object
        properties:
          nick:
            type: string
          user:
            type: string
          host:
            type: string
    required: [source, atoms]
@DanielOaks
Copy link
Member

DanielOaks commented Oct 30, 2017

For some prior art on the testing side, depending on what lang is used, see some extra stuff here.

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

No branches or pull requests

2 participants