Beispiel #1
0
def Worker():
  from grr.server.grr_response_server.bin import worker
  SetConfigOptions()
  flags.StartMain(worker.main)
Beispiel #2
0
def GRRFuse():
  from grr.server.grr_response_server.bin import fuse_mount
  SetConfigOptions()
  flags.StartMain(fuse_mount.main)
Beispiel #3
0
def GrrServer():
  from grr.server.grr_response_server.bin import grr_server
  SetConfigOptions()
  flags.StartMain(grr_server.main)
Beispiel #4
0
def GrrFrontend():
  from grr.server.grr_response_server.bin import frontend
  SetConfigOptions()
  flags.StartMain(frontend.main)
Beispiel #5
0
def ApiShellRawAccess():
  from grr.server.grr_response_server.bin import api_shell_raw_access
  SetConfigOptions()
  flags.StartMain(api_shell_raw_access.main)
Beispiel #6
0
def ConfigUpdater():
  from grr.server.grr_response_server.bin import config_updater
  SetConfigOptions()
  flags.StartMain(config_updater.main)
Beispiel #7
0
def PoolClient():
  from grr_response_client import poolclient
  SetConfigOptions()
  flags.StartMain(poolclient.main)
Beispiel #8
0
def EndToEndTests():
    from grr_response_test import run_end_to_end_tests
    SetConfigOptions()
    flags.StartMain(run_end_to_end_tests.main)
Beispiel #9
0
def Client():
  from grr_response_client import client
  SetConfigOptions()
  flags.StartMain(client.main)
Beispiel #10
0
def FleetspeakClient():
  from grr_response_client import grr_fs_client
  SetConfigOptions()
  flags.StartMain(grr_fs_client.main)
Beispiel #11
0
def ClientBuild():
  from grr_response_client import client_build
  SetConfigOptions()
  flags.StartMain(client_build.main)
Beispiel #12
0
    with test_lib.FakeTime(datetime("2030-01-01")):
      with self._Aff4Open(file_urn) as fd:
        fd.Set(fd.Schema.HASH, rdf_crypto.Hash(md5=b"blargh"))

    data_migration.MigrateClientVfs(client_urn)

    path_info = data_store.REL_DB.ReadPathInfo(
        client_id=client_urn.Basename(),
        path_type=rdf_objects.PathInfo.PathType.OS,
        components=("bar",),
        timestamp=datetime("2010-12-31"))
    self.assertEqual(path_info.hash_entry.md5, b"quux")

    path_info = data_store.REL_DB.ReadPathInfo(
        client_id=client_urn.Basename(),
        path_type=rdf_objects.PathInfo.PathType.OS,
        components=("bar",),
        timestamp=datetime("2020-12-31"))
    self.assertEqual(path_info.hash_entry.md5, b"norf")

    path_info = data_store.REL_DB.ReadPathInfo(
        client_id=client_urn.Basename(),
        path_type=rdf_objects.PathInfo.PathType.OS,
        components=("bar",),
        timestamp=datetime("2030-12-31"))
    self.assertEqual(path_info.hash_entry.md5, b"blargh")


if __name__ == "__main__":
  flags.StartMain(test_lib.main)
Beispiel #13
0
def ApiRegressionTestsGenerate():
    from grr_response_test import api_regression_test_generate
    SetConfigOptions()
    flags.StartMain(api_regression_test_generate.main)
Beispiel #14
0
def AdminUI():
  from grr.server.grr_response_server.gui import admin_ui
  SetConfigOptions()
  flags.StartMain(admin_ui.main)
Beispiel #15
0
def Console():
  from grr.server.grr_response_server.bin import console
  SetConfigOptions()
  flags.StartMain(console.main)
Beispiel #16
0
        self.Open("/#main=ServerLoadView")
        self.WaitUntil(self.IsTextPresent, "Frontends load")

        self.Click("css=li[heading=Worker]")
        self.WaitUntil(self.IsTextPresent,
                       "Worker successful vs failed flows rate")

    # TODO(user): uncomment as soon as number of instances is back.
    # def testServerLoadPageShowsCorrectNumberOfInstances(self):
    #   self.SetupSampleMetrics(token=self.token)

    #   self.Open("/#main=ServerLoadView")
    #   self.WaitUntil(self.IsTextPresent, "Frontend (1 instances)")

    def testTimeRangeButtonsAreClickable(self):
        self.Open("/#main=ServerLoadView")
        self.WaitUntil(self.IsTextPresent, "Frontends load")

        self.Click("css=label[uib-btn-radio=72]")
        self.WaitUntil(self.IsTextPresent, "Frontends load")


def main(argv):
    del argv  # Unused.
    # Run the full test suite
    unittest.main()


if __name__ == "__main__":
    flags.StartMain(main)
Beispiel #17
0
def DistEntry():
    """The main entry point for packages."""
    flags.StartMain(main)