Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests for new dev environment #40

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

Cruikshanks
Copy link
Member

DEFRA/water-abstraction-team#64

Having built a new development environment based on Docker and Docker Compose that allows us to set up and maintain WRLS on Apple M1 Mac's we've hit some further issues. A number of the repos have it had coded into the tests to assume everything is always running on http://localhost. When it comes to our new Docker environment though, the Addressbase Facade and the Charge Module aren't anymore.

When it comes to this repo, the other assumption is that the machine the app is running on has the Redis CLI installed. In our new dev environment that isn't the case, and shouldn't be assumed in our AWS environments.

So, this change

  • fixes unit tests not to depend on hard-coded URLs
  • makes the Redis based tests pending (we'll tackle those properly once we have implemented Redis support)

DEFRA/water-abstraction-team#64

Having built a new development environment based on Docker and Docker Compose that allows us to setup and maintain WRLS on Apple M1 Mac's we've hit some further issues. A number of the repos have it had coded into the tests to assume everything is always running on `http://localhost`. When it comes to our new Docker environment though, the Addressbase Facade and the Charge Module aren't anymore.

When it comes to this repo, the other assumption is that the machine the app is running on has the redis CLI installed. In our new dev environment that isn't the case, and shouldn't be assumed in our AWS environments.

So, this change

- fixes unit tests not to depend on hard coded urls
- makes the redis based tests pending (we'll tackle those properly once we have implemented redis support)
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Dec 5, 2022
@Cruikshanks Cruikshanks self-assigned this Dec 5, 2022
Use config to set the URL's to mock rather than hard code them.

The redis check won't work IRL, but the tests are actualy fine because they are mocked.

So, with this change all tests are passing locally.
@Cruikshanks Cruikshanks marked this pull request as ready for review December 5, 2022 16:48
@Cruikshanks Cruikshanks merged commit 5f0924b into main Dec 6, 2022
@Cruikshanks Cruikshanks deleted the fix-tests-in-new-dev-environment branch December 6, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants