Skip to content

TestSys CLI does not return useful yaml formatting errors #517

@jpmcb

Description

@jpmcb

Given a test yaml that looks like:

---
apiVersion: testsys.bottlerocket.aws/v1
kind: Test
metadata:
  name: hello-bones
  namespace: testsys-bottlerocket-aws
spec:
  agent:
    name: hello-agent
    image: "example-test-agent:demo"
    keep_running: false
    configuration:
      mode: Fast
      person: Bones the Cat
      helloCount: 3
      helloDurationMilliseconds: 500
  resources: []
  dependsOn: []

and attempting to run it:

❯ cli run file example_test_agent.yaml
Unable to read manifest

Note that the keep_running key should be keepRunning. The CRD key error isn't bubbled up from the underlying read_manifest

let crds = read_manifest(&self.path).context("Unable to read manifest")?;

Still new to rust, but it would be great if a more descriptive error was returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedThis issue is blocked by something.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions