示例#1
0
 def test_arg_parser_parses_azureblobpublisher(self):
     ap = ArgParser()
     ap._parse([
         '--AzureBlobPublisher-connection_string',
         'http://connection.string'
     ])
     c = ap._get_config()
     self.assertEqual(example_azureblov_publisher["publisher"],
                      c.get_publisher())
示例#2
0
 def test_arg_parser_returns_config(self):
     ap = ArgParser()
     ap._parse([
         '--LocalPublisher-dest', 'somecontext', '-i', 'smoke', '-e',
         'nonsmoke'
     ])
     c = ap._get_config()
     self.assertEqual(example_local_publisher["publisher"],
                      c.get_publisher())
     self.assertEqual(example_local_publisher["robotframework"],
                      c.get_rf_settings())
示例#3
0
 def test_arg_parser_returns_config_mixed(self):
     ap = ArgParser()
     ap._parse([
         '--CaddyPublisher-url', 'http://rf-service-caddy/uploads',
         '--ZipFetcher-url',
         'https://github.com/devopsspiral/rf-service/archive/master.zip',
         '--ZipFetcher-path', 'rf-service-master/test/resources/testcases'
     ])
     c = ap._get_config()
     self.assertEqual(example_mixed["publisher"], c.get_publisher())
     self.assertEqual(example_mixed["fetcher"], c.get_fetcher())
示例#4
0
 def test_arg_parser_saves_azureblobpublisher(self):
     ap = ArgParser()
     ap._parse([
         '--AzureBlobPublisher-connection_string', 'http://someurl',
         '--AzureBlobPublisher-path', 'path/to/container/',
         '--AzureBlobPublisher-prefix', 'super_test_prefix-'
     ])
     self.assertEqual('http://someurl',
                      ap.parameters.AzureBlobPublisher_connection_string)
     self.assertEqual('path/to/container/',
                      ap.parameters.AzureBlobPublisher_path)
     self.assertEqual('super_test_prefix-',
                      ap.parameters.AzureBlobPublisher_prefix)
示例#5
0
 def test_arg_parser_accepts_json(self):
     ap = ArgParser()
     ap._parse(['test/resources/run1.json'])
     c = ap._get_config()
     self.assertEqual({
         'type': 'LocalFetcher',
         'src': 'testcases'
     }, c.get_fetcher())
     self.assertEqual(
         {
             'type': 'CaddyPublisher',
             'url': 'http://127.0.0.1:8080/uploads'
         }, c.get_publisher())
     self.assertEqual('smoke', c.get_rf_settings()['include_tags'][0])
示例#6
0
 def test_arg_parser_saves_exclude_tags(self):
     ap = ArgParser()
     ap._parse(['-e', 'smoke', '--exclude', 'nonsmoke'])
     self.assertEqual(['smoke', 'nonsmoke'], ap.parameters.exclude_tags)
示例#7
0
 def test_arg_parser_saves_localfetcher(self):
     ap = ArgParser()
     ap._parse(['--LocalFetcher-src', 'somecontext'])
     self.assertEqual('somecontext', ap.parameters.LocalFetcher_src)
示例#8
0
 def test_arg_parser_saves_caddypublisher(self):
     ap = ArgParser()
     ap._parse(['--CaddyPublisher-url', 'http://127.0.0.1:8080/upload'])
     self.assertEqual('http://127.0.0.1:8080/upload',
                      ap.parameters.CaddyPublisher_url)
示例#9
0
 def test_arg_parser_saves_localpublisher(self):
     ap = ArgParser()
     ap._parse(['--LocalPublisher-dest', 'somecontext'])
     self.assertEqual('somecontext', ap.parameters.LocalPublisher_dest)