~sseman/juju-ci-tools/model-change-watcher-py3-2

« back to all changes in this revision

Viewing changes to assess_min_version.py

  • Committer: Aaron Bentley
  • Date: 2016-05-26 17:08:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1434.
  • Revision ID: aaron.bentley@canonical.com-20160526170821-vorjio9gnla043x7
Support FAKE as a juju binary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
            'assert_pass failed min: {} cur: {}'.format(ver, cur))
41
41
 
42
42
 
43
 
def get_current_version(client, juju_path):
44
 
    current = client.get_version(juju_path=juju_path).split('-')[:-2]
 
43
def get_current_version(client):
 
44
    current = client.version.split('-')[:-2]
45
45
    return '-'.join(current)
46
46
 
47
47
 
59
59
        assertion(client, charm_dir, ver, current, name)
60
60
 
61
61
 
62
 
def assess_min_version(client, args):
63
 
    current = get_current_version(client, args.juju_bin)
 
62
def assess_min_version(client):
 
63
    current = get_current_version(client)
64
64
    tests = [['1.25.0', 'name1250', assert_pass],
65
65
             ['99.9.9', 'name9999', assert_fail],
66
66
             ['99.9-alpha1', 'name999alpha1', assert_fail],
84
84
    configure_logging(args.verbose)
85
85
    bs_manager = BootstrapManager.from_args(args)
86
86
    with bs_manager.booted_context(args.upload_tools):
87
 
        assess_min_version(bs_manager.client, args)
 
87
        assess_min_version(bs_manager.client)
88
88
    return 0
89
89
 
90
90