Closed MonicaisHer closed 1 year ago
The change made to the DisableConfigProviderServiceSnap
function should only affect service snap tests and not the edgexfoundry snap test. I believe that the error invalid memory address or nil pointer dereference
is unrelated to the change here.
@MonicaisHer this PR as a whole is making the edgexfoundry tests fail due to that error, which is a result of changes made here. The tests pass otherwise: https://github.com/canonical/edgex-snap-testing/actions/runs/4522519514/jobs/7965047703
As said, this is either because of issues in the services or tests. You verified here that you could run the services with common config. If you are confident about what you did there, then there is an issue in the tests.
@farshidtz I understand your point now. Previously, this PR had passed the edgexfoundry test locally with the dev.108 snap build from the above go mod bootstrapper PR. However, the dev.114 snap on the edge channel no longer passes the test. Please see https://github.com/canonical/edgex-snap-testing/issues/172#issuecomment-1485054624.
@farshidtz edgexfoundry test is passing again now, please see https://github.com/canonical/edgex-snap-testing/actions/runs/4555729191/jobs/8048092713#step:5:54
Suggestion for future work: the newly added functions DisableConfigProviderXXX
don't actually disable the config provider. They just configure services to not use it and also to load common config from a file. For clarity, I'd call the action disuse rather than disable.
This PR resolves #172 and introduces new functionality to enable testing of snaps without a config provider by disabling the config provider for a specific application and setting the common configuration path.
Todo: