Skip to content

Provide an example of tests/testdata usage in bats tests #68

@MurzNN

Description

@MurzNN

To improve the test coverage, I need to use some assets from files inside the ddev project, but have a hard time understanding how to do this right.

I need to run a command inside the testing ddev project like this:

  ddev exec "curl -X POST -H "Content-Type: application/json" -d @[some_dir]/testdata/test-metric.json http://opentelemetry-grafana:4318/v1/metrics"

So, to make the files available inside the testing ddev project, I have to list them in the install.yaml that looks not so good.

So, could you please provide an example of the usage of test asset files from the testdata directory? Thanks!

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