def testVirtualMachineSubstitutions(self): test_config = CreateConfigWithPool('chromium.tests.cros.vm') self.assertEqual(magic_substitutions.ChromeOSTelemetryRemote(test_config), [ '--remote=127.0.0.1', '--remote-ssh-port=9222', ])
def testUnknownPool(self): test_config = CreateConfigWithPool('totally-legit-pool') with self.assertRaisesRegexp(RuntimeError, 'Unknown CrOS pool *'): magic_substitutions.ChromeOSTelemetryRemote(test_config)
def testNoPool(self): test_config = CreateConfigWithPool(None) with self.assertRaisesRegexp(RuntimeError, 'No pool *'): magic_substitutions.ChromeOSTelemetryRemote(test_config)
def testPhysicalHardwareSubstitutions(self): test_config = CreateConfigWithPool('chrome-cros-dut') self.assertEqual(magic_substitutions.ChromeOSTelemetryRemote(test_config), ['--remote=variable_chromeos_device_hostname'])