Merge lp:~marcoceppi/charm-tools/fix-add-tests into lp:charm-tools/1.4
Proposed by
Marco Ceppi
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Tim Van Steenburgh | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~marcoceppi/charm-tools/fix-add-tests | ||||
Merge into: | lp:charm-tools/1.4 | ||||
Diff against target: |
214 lines (+92/-40) 5 files modified
charmtools/generate.py (+23/-12) charmtools/templates/tests/body.tpl (+51/-25) charmtools/templates/tests/deploy.tpl (+1/-1) charmtools/templates/tests/relate.tpl (+1/-1) tests/test_charm_generate.py (+16/-1) |
||||
To merge this branch: | bzr merge lp:~marcoceppi/charm-tools/fix-add-tests | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Van Steenburgh (community) | Approve | ||
Review via email: mp+240760@code.launchpad.net |
To post a comment you must log in.
This looks good, I just have a few comments, using this snip from the test I created as an example:
```
#!/usr/bin/env python3
import amulet
import requests
import unittest
class TestDeployment( unittest. TestCase) :
cls.deployment = amulet. Deployment( series= 'trusty' )
@classmethod
def setUpClass(cls):
```
1. We should install python3-requests in 00-setup since it's imported by 99-autogen.
2. cls.deployment. add('cs: precise/ apache2- 25') - I think we should just add 'apache2' here, and let amulet get the latest revision in the correct series.
3. cls.deployment. relate( 'thinkup: website' , 'apache2') - Amulet will choke on this b/c the 2nd arg does not explicitly name the relation. Can this be corrected?
4. I agree with you about the templating approach, it's not ideal. Better would be to make body.tpl a Jinja template and do the looping directly in the template. Not a big deal though, we could clean that up later if you don't feel like doing it now.