def setUp(self): super(SystemCronFlowTest, self).setUp() # Mock today's time to be 8 days after the fixture date. self.old_time = time.time self.now = test_lib.FIXTURE_TIME + 8 * 60 * 60 * 24 time.time = lambda: self.now # We are only interested in the client object (path = "/" in client VFS) fixture = test_lib.FilterFixture(regex="^/$") # Make 10 windows clients for i in range(0, 10): test_lib.ClientFixture("C.0%015X" % i, token=self.token, fixture=fixture) # Make 10 linux clients 12 hours apart. for i in range(0, 10): test_lib.ClientFixture("C.1%015X" % i, token=self.token, fixture=client_fixture.LINUX_FIXTURE)
def setUp(self): super(SystemCronFlowTest, self).setUp() # We are only interested in the client object (path = "/" in client VFS) fixture = test_lib.FilterFixture(regex="^/$") # Make 10 windows clients for i in range(0, 10): test_lib.ClientFixture("C.0%015X" % i, token=self.token, fixture=fixture) with aff4.FACTORY.Open( "C.0%015X" % i, mode="rw", token=self.token) as client: client.AddLabels("Label1", "Label2", owner="GRR") client.AddLabels("UserLabel", owner="jim") # Make 10 linux clients 12 hours apart. for i in range(0, 10): test_lib.ClientFixture("C.1%015X" % i, token=self.token, fixture=client_fixture.LINUX_FIXTURE)