caddy: Error: reading config file: open ./test.init.config: no such file or directory

Upgraded to 2.6.2 and running the following unit test.

https://github.com/greenpau/caddy-security/blob/cfc03c5f47313f4b2d6699193659f41040511b49/app_test.go#L53-L62

Get this error:

START| App
     | Error: reading config file: open ./test.init.config: no such file or directory

Do I need to change something in tests?

cc: @mholt

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

For the record, the testing library works properly again for us. Fixing the config to prevent the “POSTed configuration isn’t active” error is straightforward: https://github.com/dunglas/mercure/pull/751/commits/4b972c14bdba82fa750de420cf95487f21a34531

I feel like if it works for you, and isn’t flaky, then might as well just leave the tests in place.

I just don’t have the bandwidth to look at it right now – but I hope we can get it working!

It is OK! Once the facility is available, please let me know and I will re-add the tests.

To clarify, I don’t think it’s a rule, it’s just unspecified behavior/usage.

I think the ability to run tests by plugins is important, but more effort needs to be put there.

I’m not sure what the problem is with this issue, but it’d be nice to have it looked at and resolved if it is a regression, even though the behavior was kind of unspecced before. I’m bummed that your tests broke 😦

I just don’t have the bandwidth to look at it right now – but I hope we can get it working!