コード例 #1
0
ファイル: test_github.py プロジェクト: cogniteev/easy-upgrade
 def test_install_compose_only(self):
     if osp.isdir(self.stow_root_dir):
         shutil.rmtree(self.stow_root_dir)
     eu = EasyUpgrade.from_yaml(self.YAML_CONFIG_FILE)
     eu.providers['github'].install('docker/compose')
     compose_executable = osp.join(
         self.stow_root_dir,
         'stow',
         'compose-1.3.3',
         'bin',
         'docker-compose'
     )
     self.assertTrue(osp.isfile(compose_executable))
コード例 #2
0
ファイル: test_github.py プロジェクト: cogniteev/easy-upgrade
 def test_outdated_packages(self):
     if osp.isdir(self.stow_root_dir):
         shutil.rmtree(self.stow_root_dir)
     eu = EasyUpgrade.from_yaml(self.YAML_CONFIG_FILE)
     outdated = list(eu.get_outdated_packages())
     self.assertEqual(len(outdated), 2)
     expected = [
         {
             'release': 'docker/machine',
             'provider': 'github',
             'versions': {
                 'candidate': {
                     'human': u'v0.3.1',
                     'tuple': (
                         u'00000000', u'00000003',
                         u'00000001', '*final'
                     )
                 }
             }
         },
         {
             'release': 'docker/compose',
             'provider': 'github',
             'versions': {
                 'candidate': {
                     'human': u'1.3.3',
                     'tuple': (
                         u'00000001', u'00000003',
                         u'00000003', '*final'
                     )
                 }
             }
         }
     ]
     for o in outdated:
         self.assertIn(o, expected)
     for e in expected:
         self.assertIn(e, outdated)