Exemple #1
0
    def Run(self):
        # Fix the time to avoid regressions.
        with test_lib.FakeTime(42):
            client_ids = self.SetupClients(1)

            with aff4.FACTORY.Open(client_ids[0], mode="rw",
                                   token=self.token) as grr_client:
                grr_client.Set(grr_client.Schema.MEMORY_SIZE(4294967296))
                # Delete the certificate as it's being regenerated every time the
                # client is created.
                grr_client.DeleteAttribute(grr_client.Schema.CERT)

        self.Check("GetClient",
                   args=client_plugin.ApiGetClientArgs(
                       client_id=client_ids[0].Basename()))
Exemple #2
0
    def Run(self):
        # Fix the time to avoid regressions.
        with test_lib.FakeTime(42):
            if data_store.RelationalDBReadEnabled():
                client_obj = self.SetupTestClientObject(0,
                                                        memory_size=4294967296,
                                                        add_cert=False)
                client_id = client_obj.client_id
            else:
                client_urn = self.SetupClient(0,
                                              memory_size=4294967296,
                                              add_cert=False)
                client_id = client_urn.Basename()

        self.Check("GetClient",
                   args=client_plugin.ApiGetClientArgs(client_id=client_id))