bottlerocket-test-system
bottlerocket-test-system copied to clipboard
TestSys CLI does not return useful yaml formatting errors
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
https://github.com/bottlerocket-os/bottlerocket-test-system/blob/e4c6d22e76cacde344ef0765ed5630edf15ea58e/cli/src/run_file.rs#L17
Still new to rust, but it would be great if a more descriptive error was returned.