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

Refactor local_test.go to make tests (more) idempotent #371

Closed
rfay opened this issue Jul 4, 2017 · 0 comments
Closed

Refactor local_test.go to make tests (more) idempotent #371

rfay opened this issue Jul 4, 2017 · 0 comments

Comments

@rfay
Copy link
Member

rfay commented Jul 4, 2017

What happened (or feature request):

As noted in #337 (comment) there are some serious problems with the structure of local_test.go:

  • TestMain sets up the workspaces and then removes them after tests.
  • However, TestMain does not shut down the sites or even try to do so. It could at least use the same techniques as TestLocalRemove and TestCleanupWithoutCompose to clean up the containers.
  • The result is 3 nonworking sites (which do not show up on ddev list, apparently because the workspace is gone)
  • TestLocalExec is dependent on a database having been loaded by TestLocalImportDb

What you expected to happen:

  • Each test should be able to be run independently
  • Each test run should leave the system in a predictable state
  • ddev list should report sites even when their workspace is trashed, this will likely happen in real life.

Version: Please include the output of ddev version and the project's .ddev/config.yaml.

How to reproduce this:

make testpkg TESTARGS="-run TestLocalStart"

Anything else do we need to know:

Related source links or issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants