def test_compute_cipd_input_exclusion(self): build = self._test_build() cipd_input = swarming._compute_cipd_input(build, self.settings) packages = {p['package_name']: p for p in cipd_input['packages']} self.assertIn('infra/tools/git', packages) self.assertIn('infra/cpython/python', packages) self.assertNotIn('infra/excluded', packages)
def test_compute_cipd_input_canary(self): build = self._test_build(canary=True) cipd_input = swarming._compute_cipd_input(build, self.settings) packages = {p['package_name']: p for p in cipd_input['packages']} self.assertEqual( packages['infra/tools/bbagent']['version'], 'luci-runner-version-canary', ) self.assertEqual( packages['infra/tools/git']['version'], 'git-version-canary', )
def test_compute_cipd_input_path(self): build = self._test_build() cipd_input = swarming._compute_cipd_input(build, self.settings) packages = {p['package_name']: p for p in cipd_input['packages']} self.assertEqual( packages['infra/tools/git']['path'], swarming.USER_PACKAGE_DIR, ) self.assertEqual( packages['infra/cpython/python']['path'], '%s/python' % swarming.USER_PACKAGE_DIR, )