-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Jonahstanley/acceptance tests unique database #298
Jonahstanley/acceptance tests unique database #298
Conversation
_CONTENTSTORE.clear() | ||
modulestore = xmodule.modulestore.django.modulestore() | ||
modulestore.collection.drop() | ||
xmodule.modulestore.django._MODULESTORES.clear() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines need comments. Specifically, why are we dropping the database in one case (the content store) but dropping collections in the other (the module store)?
@JonahStanley the modulestore collection is not being cleared out after the last test is run. To verify:
run the tests, then from mongo
4 collections are created by running rake test_acceptance_lms. |
These databases/collections are cleared after harvest
This might allow parallel features in the future
This is to allow acceptance tests to properly link and know the names of its other parts
Acceptance_static is used to prevent collect static from using a seed test.py had its seed removed due to redundancy
@@ -80,7 +80,7 @@ TEST_TASK_DIRS = [] | |||
|
|||
# Run acceptance tests | |||
desc "Run acceptance tests" | |||
task "test_acceptance_#{system}", [:harvest_args] => [:clean_test_files, "#{system}:gather_assets:acceptance", "fasttest_acceptance_#{system}"] | |||
task "test_acceptance_#{system}", [:harvest_args] => [:clean_test_files, "#{system}:gather_assets:acceptance_static", "fasttest_acceptance_#{system}"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add in a comment explaining why we did this, so that we remember and other people know why too.
This explains why acceptance_static is used
""" | ||
This config file extends the test environment configuration | ||
so that we can run the lettuce acceptance tests. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain why we need to do this. Something like that we want the same settings as acceptance.py except for the db or collection names, because otherwise any call to django-admin (including collectstatic) will create another uniquely named one.
👍 |
…-database Jonahstanley/acceptance tests unique database
…roficiency-avg ziafazal/api-fix-company-proficiency-avg: fix for incorrect average calculation
i18n 1.28
* Commits: Run coverage via Github Action
Suggested Reviewers: @jzoldak @wedaly
Acceptance tests now pull from their own database/collection
These are destroyed at the end of each scenario