コード例 #1
0
 def test_trigger_no_swarming_env_var(self):
   with self.assertRaises(SystemExit):
     with test_utils.EnvVars({'ISOLATE_SERVER': 'https://host'}):
       main(['trigger', '-T' 'foo', 'foo.isolated'])
   self._check_output(
       '',
       'Usage: swarming.py trigger [options] (hash|isolated) [-- extra_args]'
       '\n\n'
       'swarming.py: error: --swarming is required.'
       '\n')
コード例 #2
0
 def test_trigger_no_isolate_env_var(self):
   with self.assertRaises(SystemExit):
     with test_utils.EnvVars({'SWARMING_SERVER': 'https://host'}):
       main(['trigger', 'T', 'foo', 'foo.isolated'])
   self._check_output(
       '',
       'Usage: swarming.py trigger [options] (hash|isolated) [-- extra_args]'
       '\n\n'
       'swarming.py: error: Use one of --indir or --isolate-server.'
       '\n')
コード例 #3
0
 def test_trigger_no_isolate_server(self):
     with self.assertRaises(SystemExit):
         with test_utils.EnvVars({'SWARMING_SERVER': 'https://host'}):
             main(['trigger', 'foo.isolated', '-d', 'os', 'amiga'])
     self._check_output(
         '', 'Usage: swarming.py trigger [options] (hash|isolated) '
         '[-- extra_args|raw command]'
         '\n\n'
         'swarming.py: error: --isolate-server is required.'
         '\n')
コード例 #4
0
 def test_trigger_env_var(self):
   with self.assertRaises(SystemExit):
     with test_utils.EnvVars({'ISOLATE_SERVER': 'https://host',
                              'SWARMING_SERVER': 'https://host'}):
       main(['trigger', '-T', 'foo'])
   self._check_output(
       '',
       'Usage: swarming.py trigger [options] (hash|isolated) [-- extra_args]'
       '\n\n'
       'swarming.py: error: Must pass one .isolated file or its hash (sha1).'
       '\n')
コード例 #5
0
 def test_archive_directory_envvar(self):
     with test_utils.EnvVars({'ISOLATE_SERVER': 'https://localhost:1'}):
         self.help_test_archive(['archive'])