~juju-qa/juju-ci-tools/trunk

« back to all changes in this revision

Viewing changes to tests/test_gotestwin.py

  • Committer: Curtis Hovey
  • Date: 2017-01-25 02:32:29 UTC
  • mfrom: (1855 trunk)
  • mto: This revision was merged to the branch mainline in revision 1865.
  • Revision ID: curtis@canonical.com-20170125023229-g7c6bzt0cqe1j8g3
Merged trunk and resolved conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
 
14
14
S3_CI_PATH = os.path.join(gotestwin.SCRIPTS, 's3ci.py')
15
 
JUJU_HOME = os.path.join(gotestwin.SCRIPTS, '..', 'cloud-city')
 
15
JUJU_HOME = os.path.normpath(os.path.join(
 
16
    gotestwin.SCRIPTS, '..', 'cloud-city'))
16
17
 
17
18
 
18
19
@contextlib.contextmanager
42
43
            data['command'])
43
44
        co_mock.assert_called_once_with(
44
45
            [S3_CI_PATH, 'get', '1234', 'build-revision',
45
 
             'juju_core.*.tar.gz', './'])
 
46
             '.*.tar.gz', './'])
46
47
        tarfile_call = call(
47
48
            [S3_CI_PATH, 'get-summary', '1234', 'GoTestWin'])
48
49
        gotest_call = call(
49
 
            ['workspace-run', '-v', '-i', 'cloud-city/staging-juju-rsa',
 
50
            ['workspace-run', '-v', '-i',
 
51
             '{}/staging-juju-rsa'.format(JUJU_HOME),
50
52
             'temp-config.yaml', 'Administrator@host'])
51
53
        self.assertEqual([tarfile_call, gotest_call], cc_mock.call_args_list)
52
54
 
64
66
             'github.com/juju/juju/cmd', '--remove', 'ci/bar.tar.gz'],
65
67
            data['command'])
66
68
        cc_mock.assert_called_once_with(
67
 
            ['workspace-run', '-v', '-i', 'cloud-city/staging-juju-rsa',
68
 
             'temp-config.yaml', 'Administrator@host'])
 
69
            ['workspace-run', '-v', '-i',
 
70
             '{}/staging-juju-rsa'.format(JUJU_HOME), 'temp-config.yaml',
 
71
             'Administrator@host'])