Skip to content

Validate Test Specification Schema #7

@twobiers

Description

@twobiers

During my experiments with xprin, I've noticed that xprin happily accepts an invalid test specification, e.g. (See tests[0].observed-resources):

common:
  inputs:
    functions: ../_shared/functions.yaml
    composition: ./composition.yaml
    xr: ./xr.yaml
    extra-resources: ./extra-resources
    crds:
      - ../../../apis
      - ../../../crossplane.yaml

tests:
  - name: "First reconcilation loop creates User Assigned Identity"
     observed-resources: # Note that we have not placed observed resources under `inputs`
       - ./observed
     assertions:
      - name: "user-assigned-identity-exists"
        type: "Exists"
        resource: "UserAssignedIdentity/example-identity"

I think it would be good if xprin would error out here.

Additionally, it would be cool to generate a JSON Schema from the type definition, so one could point the IDE to it for autocompletion/IntelliSense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions