~veebers/juju-ci-tools/perf-initial-heatmap-details

« back to all changes in this revision

Viewing changes to tests/test_schedule_reliability_tests.py

  • Committer: Aaron Bentley
  • Date: 2016-04-21 16:11:40 UTC
  • mto: This revision was merged to the branch mainline in revision 1368.
  • Revision ID: aaron.bentley@canonical.com-20160421161140-h8h276higl1fqml4
Switch schedule_reliability_tests to use artifacts dirs and omit path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
            call('foo', {
87
87
                'suite': 'qux',
88
88
                'attempts': '10',
89
 
                'new_juju_dir': 'bar',
90
89
                'revision_build': '1',
91
90
                }, token='quxxx'),
92
91
            call('foo', {
93
92
                'suite': 'qux',
94
93
                'attempts': '10',
95
 
                'new_juju_dir': 'baz',
96
94
                'revision_build': '2'
97
95
                }, token='quxxx'),
98
96
            ]
108
106
            'foo', {
109
107
                'suite': 'qux,quxx',
110
108
                'attempts': '10',
111
 
                'new_juju_dir': 'baz',
112
109
                'revision_build': '1',
113
110
                }, token='bar')
114
111
 
129
126
    def test_selects_newest_candidate(self):
130
127
        with self.build_job_context() as root:
131
128
            path_1234 = make_candidate_dir(
132
 
                root, '1234', 'mybranch', '1234')
 
129
                root, '1234-artifacts', 'mybranch', '1234')
133
130
            make_candidate_dir(root, '1233', 'mybranch', '1233')
134
131
            build_job_mock = self.run_main(root)
135
132
        build_job_mock.assert_called_once_with('foo', {
136
 
            'new_juju_dir': path_1234,
137
133
            'attempts': '10',
138
134
            'suite': 'full',
139
135
            'revision_build': '1234',
144
140
        # even if there are more than 3 latest.
145
141
        with self.build_job_context() as root:
146
142
            make_candidate_dir(
147
 
                root, 'branch1', 'mybranch1')
148
 
            make_candidate_dir(
149
 
                root, 'branch2', 'mybranch2')
150
 
            make_candidate_dir(
151
 
                root, 'branch3', 'mybranch3')
152
 
            make_candidate_dir(
153
 
                root, 'branch4', 'mybranch4')
 
143
                root, 'branch1-artifacts', 'mybranch1')
 
144
            make_candidate_dir(
 
145
                root, 'branch2-artifacts', 'mybranch2')
 
146
            make_candidate_dir(
 
147
                root, 'branch3-artifacts', 'mybranch3')
 
148
            make_candidate_dir(
 
149
                root, 'branch4-artifacts', 'mybranch4')
154
150
            build_job_mock = self.run_main(root)
155
151
        self.assertEqual(build_job_mock.call_count, 3)