Add ResourceCache class to testing_utils

[work in progress, needs to be come weak]

This class allows to share data among test cases.
It is used by integration tests to run jobs once and observe multiple
properties of each job in a separate test case.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Add load_scenario_data() and execute_job() to integration tests

[work in progress, needs docstring updates]

Those functions are going to replace the current implementation of
integration test suite. They grew to be too big to keep in the test
class itself

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Parametrize integration tests by scenario path, not job name

To support testing a single job multiple times (in various configurations)
we need to decouple the test scenario from the job it operates on.

Each job can have multiple scenarios that affect it, for example
with and without dependencies, on various OS versions, with various
hardware, etc.

[ this patch breaks the tree but is shorter to review ]

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Load scenario data and run the job (if needed) during setUp()

This allows actual test methods to simply check if some of the
job result (be it return code or the output) matches expectations
encoded in the test scenario, thus making tests easier to read.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Replace test_job_result() with test_job_result() and test_job_return_code()

The old test_job_result() was responsible for loading and running
everything. The new methods just observe state that was established
during setUp()

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Drop unused import

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Skip scenarios that are not intended for the current profile

[work in progress]

Profile is currently hard-coded as there is no easy way to pass it from
the test loader. This needs more work.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Update integration testing scenarios to the current format

[work in progress, remove 'ensure' key]

The real change is anchoring the result in the "result" key and adding
"job_name" as a parameter.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Add Vagrantfile for testing in quantal

[work in progress, needs better commit message]

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>