def Run(self): failing_descriptor = rdf_output_plugin.OutputPluginDescriptor( plugin_name=hunt_test_lib.FailingDummyHuntOutputPlugin.__name__) with test_lib.FakeTime(42, increment=1): if data_store.RelationalDBEnabled(): hunt_id = self.CreateHunt(description="the hunt", output_plugins=[failing_descriptor]) hunt.StartHunt(hunt_id) else: hunt_urn = self.StartHunt(description="the hunt", output_plugins=[failing_descriptor]) hunt_id = hunt_urn.Basename() self.client_ids = self.SetupClients(2) for index, client_id in enumerate(self.client_ids): self.RunHunt(client_ids=[client_id], failrate=-1) with test_lib.FakeTime(100042 + index * 100): try: self.ProcessHuntOutputPlugins() except process_results.ResultsProcessingError: if flags.FLAGS.pdb_post_mortem: pdb.post_mortem() self.Check("ListHuntOutputPluginErrors", args=hunt_plugin.ApiListHuntOutputPluginErrorsArgs( hunt_id=hunt_id, plugin_id="FailingDummyHuntOutputPlugin_0"), replace={hunt_id: "H:123456"})
def Run(self): failing_descriptor = rdf_output_plugin.OutputPluginDescriptor( plugin_name=hunt_test_lib.FailingDummyHuntOutputPlugin.__name__) with test_lib.FakeTime(42, increment=1): hunt_id = self.CreateHunt(description="the hunt", output_plugins=[failing_descriptor], creator=self.token.username) hunt.StartHunt(hunt_id) self.client_ids = self.SetupClients(2) for client_id in self.client_ids: self.RunHunt(client_ids=[client_id], failrate=-1) self.Check("ListHuntOutputPluginErrors", args=hunt_plugin.ApiListHuntOutputPluginErrorsArgs( hunt_id=hunt_id, plugin_id="FailingDummyHuntOutputPlugin_0"), replace={hunt_id: "H:123456"})
def Run(self): failing_descriptor = output_plugin.OutputPluginDescriptor( plugin_name=hunt_test_lib.FailingDummyHuntOutputPlugin.__name__) with test_lib.FakeTime(42, increment=1): hunt_urn = self.StartHunt(description="the hunt", output_plugins=[failing_descriptor]) self.client_ids = self.SetupClients(2) for index, client_id in enumerate(self.client_ids): self.AssignTasksToClients(client_ids=[client_id]) self.RunHunt(failrate=-1) with test_lib.FakeTime(100042 + index * 100): try: self.ProcessHuntOutputPlugins() except process_results.ResultsProcessingError: if flags.FLAGS.debug: pdb.post_mortem() self.Check("ListHuntOutputPluginErrors", args=hunt_plugin.ApiListHuntOutputPluginErrorsArgs( hunt_id=hunt_urn.Basename(), plugin_id="FailingDummyHuntOutputPlugin_0"), replace={hunt_urn.Basename(): "H:123456"})