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

« back to all changes in this revision

Viewing changes to tests/test_build_juju.py

  • Committer: Andrew Beach
  • Date: 2016-12-01 15:34:05 UTC
  • mto: This revision was merged to the branch mainline in revision 1784.
  • Revision ID: andrew.beach@canonical.com-20161201153405-5xkzctgd699owtlm
Updated build_juju to support the ubuntu-agent product.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    Credentials,
8
8
    )
9
9
from build_juju import (
 
10
    ARTIFACT_GLOBS,
10
11
    build_juju,
11
 
    get_script,
 
12
    get_crossbuild_script,
12
13
    main,
13
14
)
14
15
from utility import temp_dir
52
53
        self.assertEqual(
53
54
            {'archive': False, 'dry_run': True, 'verbose': True},
54
55
            ga_mock.call_args[1])
55
 
        crossbuild = get_script()
 
56
        crossbuild = get_crossbuild_script()
56
57
        self.assertEqual(
57
58
            ([crossbuild, 'win-client', '-b', '~/crossbuild',
58
59
              'juju-core_1.2.3.tar.gz'], ),
59
60
            rc_mock.call_args[0])
60
61
        self.assertEqual(
61
62
            {'dry_run': True, 'verbose': True}, rc_mock.call_args[1])
62
 
        globs = [
63
 
            'juju-setup-*.exe', 'juju-*-win2012-amd64.tgz',
64
 
            'juju-*-osx.tar.gz', 'juju-*-centos7-amd64.tgz',
65
 
            'juju-*-centos7.tar.gz']
66
 
        self.assertEqual((work_dir, globs), aa_mock.call_args[0])
 
63
        self.assertEqual((work_dir, ARTIFACT_GLOBS), aa_mock.call_args[0])
67
64
        self.assertEqual(
68
65
            {'dry_run': True, 'verbose': True}, aa_mock.call_args[1])
69
66
 
70
 
    def test_get_script(self):
 
67
    def test_get_crossbuild_script(self):
71
68
        self.assertEqual(
72
69
            '/foo/juju-release-tools/crossbuild.py',
73
 
            get_script('/foo/juju-release-tools'))
 
70
            get_crossbuild_script('/foo/juju-release-tools'))
74
71
        parent_dir = os.path.realpath(
75
72
            os.path.join(__file__, '..', '..', '..'))
76
73
        self.assertEqual(
77
74
            os.path.join(parent_dir, 'juju-release-tools', 'crossbuild.py'),
78
 
            get_script())
 
75
            get_crossbuild_script())