~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to README.md

  • Committer: Aaron Bentley
  • Date: 2015-12-15 16:03:14 UTC
  • mto: This revision was merged to the branch mainline in revision 1197.
  • Revision ID: aaron.bentley@canonical.com-20151215160314-zsy2kn45fefnqlht
Switch FakeJujuClient to raise on accessing juju_home.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
Once juju is published to the test clouds, individual tests can be performed.
21
21
Most tests accept an env name. The envs define the cloud and series to test.
22
22
 
23
 
## Requirements for running tests
24
 
You will need some python libraries in order to run the existing CI tests.
25
 
Install the following
26
 
 
27
 
sudo apt-get install python-launchpadlib python-yaml python-boto python-mock
28
 
 python-jenkins python-novaclient python-pexpect python-winrm python-coverage
29
 
 
30
 
In addition, if you wish to use azure, you will need to install pip, and the
31
 
associated client library from pip for azure.
32
 
 
33
 
sudo apt-get install python-pip
34
 
pip install azure
35
 
 
36
 
# Creating a New CI Test
37
 
 
38
 
Test scripts will be run under many conditions to reproduce real cases.
39
 
Most scripts cannot assume special knowledge of the substrate, region,
40
 
bootstrap constraints, tear down, and log collection, etc.
41
 
 
42
 
If this is your first time, consider asking one of the QA team to pair-program
43
 
on it with you.
44
 
 
45
 
You can base your new script and its unit tests on the template files.
46
 
They provide the infrastructure to setup and tear down a test. Your script
47
 
can focus on the unique aspects of your test. Start by making a copy of
48
 
template_assess.py.tmpl, and don't forget unit tests!
49
 
 
50
 
    make new-assess name=my_function
51
 
 
52
 
Run make lint early and often. (You may need to do sudo apt-get install python-
53
 
flake8). If you forget, you can run autopep8 to fix certain issues. Please use
54
 
--ignore E24,E226,E123 with autopep8. Code that's been hand-written to follow
55
 
PEP8 is generally more readable than code which has been automatically
56
 
reformatted after the fact. By running make lint often, you'll absorb the style
57
 
and write nice PEP8-compliant code.
58
 
 
59
 
Please avoid creating diffs longer than 400 lines. If you are writing a new
60
 
test, that may mean creating it as a series of branches. You may find bzr-
61
 
pipeline to be a useful tool for managing a series of branches.
62
 
 
63
 
If your tests require new charms, please write them in Python.