-
Notifications
You must be signed in to change notification settings - Fork 96
Fix image scripts not being included in user deploy #592
Conversation
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.
Looks good! Thanks Connor.
40ea436
to
6d40789
Compare
My original patch was so small it seemed like it would just work (and I did test it locally). It turned out not to work. Because you cannot filter over a queryset that has been evaluated. (you can, but you get nonsense results). Anywho to the power of writing tests for even the smallest changes. |
In this commit acb6729, we removed the task which ran image scripts against an instance. There is a lot confusing terminology that needs to be cleaned up.
This test will start failing when it has built up results in the redis cache. Need to revisit it, but travis doesn't catch it because it starts with a clean cache.
6d40789
to
74a08ac
Compare
This test case broke when the instance_factory began returning a project. This change makes the test only compare values it is actively trying to test, namely the assignment of an allocation source.
This test case broke when the instance_factory began returning a project. This change makes the test only compare values it is actively trying to test, namely instance name.
74a08ac
to
46666ed
Compare
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.
This is fantastic effort @cdosborn ! 🙇
from api.tests.factories import BootScriptRawTextFactory, InstanceFactory, UserFactory | ||
|
||
|
||
class UserDeployTests(TestCase): |
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.
💯
@@ -172,6 +172,7 @@ def test_user_sees_no_statistics(self): | |||
response = client.get(url) | |||
self.assertEquals(response.status_code, 404) | |||
|
|||
@skip("Test is non deterministic and yields different results based on its redis cache") |
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.
Ouch.
Description
Problem:
Image scripts are never deployed to an instance
Solution:
Deploy image scripts alongside instance scripts
In this commit acb6729, we removed the task which ran image scripts against an instance.
Checklist before merging Pull Requests
[ ] Documentation created/updated at Example link to documentation to give context to the feature[ ] If creating/modifying DB models which will contain secrets or sensitive information, PR to clank updating sanitation queries inroles/sanitary-sql-access/templates/sanitize-dump.sh.j2
[ ] New variables supported in Clank[ ] New variables committed to secrets repos