Exemplo n.º 1
0
    def test_ping(self):
        config_path = tempfile.mktemp()
        args = ["--url=" + url, "--config_path=" + config_path, "register"]
        self.assertTrue(cli.main(args))

        args = ["--url=" + url, "--config_path=" + config_path, "ping"]
        self.assertTrue(cli.main(args))
Exemplo n.º 2
0
    def test_ping(self):
        config_path = tempfile.mktemp()
        args = ["--url=" + url, "--config_path=" + config_path, "register"]
        self.assertTrue(cli.main(args))

        args = ["--url=" + url, "--config_path=" + config_path, "ping"]
        self.assertTrue(cli.main(args))
Exemplo n.º 3
0
    def test_build(self):
        path = tempfile.mktemp()

        args = [
            "--nop2p",
            "--url=" + url,
            "--config_path=" + path,
            "register",
        ]
        cli.main(args)

        args = [
            "--nop2p",
            "--url=" + url,
            "--config_path=" + path,
            "--max_size=" + str(1024 * 256),  # 256K
            "--min_free_size=" + str(1024 * 256),  # 256K
            "build",
            "--workers=4",
            "--cleanup",
            "--rebuild",
            "--repair",
            "--set_height_interval=3"
        ]
        self.assertTrue(cli.main(args))
Exemplo n.º 4
0
    def test_build(self):
        path = tempfile.mktemp()

        args = [
            "--nop2p",
            "--url=" + url,
            "--config_path=" + path,
            "register",
        ]
        cli.main(args)

        args = [
            "--nop2p",
            "--url=" + url,
            "--config_path=" + path,
            "--max_size=" + str(1024 * 256),  # 256K
            "--min_free_size=" + str(1024 * 256),  # 256K
            "build",
            "--workers=4",
            "--cleanup",
            "--rebuild",
            "--repair",
            "--set_height_interval=3"
        ]
        self.assertTrue(cli.main(args))
Exemplo n.º 5
0
 def callback():
     cli.main([
         "--address=" + address_mu,
         "--url=" + url,
         "poll",
         "--register_address",
         "--delay=5",
         "--limit=xyz"
     ])
Exemplo n.º 6
0
 def callback():
     cli.main([
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "poll",
         "--register_address",
         "--delay=5",
         "--limit=xyz"
     ])
Exemplo n.º 7
0
 def callback():
     path = tempfile.mktemp()
     cli.main([
         "--url=" + url,
         "--config_path=" + path,
         "register",
     ])
     cli.main([
         "--url=" + url, "--config_path=" + path, "poll", "--delay=5",
         "--limit=xyz"
     ])
Exemplo n.º 8
0
 def callback():
     path = tempfile.mktemp()
     cli.main([
         "--url=" + url,
         "--config_path=" + path,
         "register",
     ])
     cli.main([
         "--url=" + url,
         "--config_path=" + path,
         "poll",
         "--delay=5",
         "--limit=xyz"
     ])
Exemplo n.º 9
0
    def test_poll(self):
        path = tempfile.mktemp()

        args = ["--url=" + url, "--config_path=" + path, "register"]
        cli.main(args)

        args = [
            "--url=" + url,
            "--config_path=" + path,
            "poll",
            "--delay=0",
            "--limit=0",
        ]  # no pings needed for check args
        self.assertTrue(cli.main(args))
Exemplo n.º 10
0
    def test_audit(self):
        path = tempfile.mktemp()

        args = [
            "--url=" + url,
            "--config_path=" + path,
            "register",
        ]
        cli.main(args)

        args = [
            "--url=" + url, "--config_path=" + path, "audit", "--delay=0",
            "--limit=0"
        ]  # no audit needed for check args
        self.assertTrue(cli.main(args))
Exemplo n.º 11
0
    def test_poll(self):
        path = tempfile.mktemp()

        args = [
            "--nop2p",
            "--url=" + url,
            "--config_path=" + path,
            "register",
        ]
        cli.main(args)

        args = [
            "--nop2p", "--url=" + url, "--config_path=" + path, "poll",
            "--delay=0", "--limit=0"
        ]  # no pings needed for check args
        self.assertTrue(cli.main(args))
Exemplo n.º 12
0
 def test_version(self):
     args = [
         "--nop2p",
         "--config_path=" + tempfile.mktemp(),
         "version"
     ]
     self.assertTrue(cli.main(args))
Exemplo n.º 13
0
 def test_register(self):
     args = [
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "register"
     ]
     self.assertTrue(cli.main(args))
Exemplo n.º 14
0
 def test_register(self):
     args = [
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "register"
     ]
     self.assertTrue(cli.main(args))
Exemplo n.º 15
0
    def test_poll(self):
        path = tempfile.mktemp()

        args = [
            "--url=" + url,
            "--config_path=" + path,
            "register",
        ]
        cli.main(args)

        args = [
            "--url=" + url,
            "--config_path=" + path,
            "poll",
            "--delay=2",
            "--limit=10"
        ]
        self.assertTrue(cli.main(args))
Exemplo n.º 16
0
 def test_poll(self):
     args = [
         "--address=" + address_eta,
         "--url=" + url,
         "poll",
         "--register_address",
         "--delay=5",
         "--limit=60"
     ]
     self.assertTrue(cli.main(args))
Exemplo n.º 17
0
 def test_poll(self):
     args = [
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "poll",
         "--register_address",
         "--delay=5",
         "--limit=60"
     ]
     self.assertTrue(cli.main(args))
Exemplo n.º 18
0
    def test_audit(self):
        path = tempfile.mktemp()

        args = [
            "--nop2p",
            "--url=" + url,
            "--config_path=" + path,
            "register",
        ]
        cli.main(args)

        args = [
            "--nop2p",
            "--url=" + url,
            "--config_path=" + path,
            "audit",
            "--delay=0",
            "--limit=0"
        ]  # no audit needed for check args
        self.assertTrue(cli.main(args))
Exemplo n.º 19
0
 def test_farm(self):
     args = [
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "--max_size=" + str(1024 * 256),  # 256K
         "farm",
         "--cleanup",
         "--rebuild",
         "--set_height_interval=3",
         "--delay=0",
         "--limit=0",
     ]  # no pings needed for check args
     self.assertTrue(cli.main(args))
Exemplo n.º 20
0
 def test_farm(self):
     args = [
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "--max_size=" + str(1024 * 256),  # 256K
         "farm",
         "--cleanup",
         "--rebuild",
         "--set_height_interval=3",
         "--delay=0",
         "--limit=0"
     ]  #no pings needed for check args
     self.assertTrue(cli.main(args))
Exemplo n.º 21
0
#!/usr/bin/env python


import sys  # pragma: no cover
from dataserv_client import cli  # pragma: no cover


if __name__ == "__main__":  # pragma: no cover
    cli.main(sys.argv[1:])  # pragma: no cover
Exemplo n.º 22
0
 def callback():
     cli.main(["--address=xyz", "--url=" + url, "register"])
Exemplo n.º 23
0
 def test_register(self):
     args = ["--address=" + addresses["theta"], "--url=" + url, "register"]
     self.assertTrue(cli.main(args))
Exemplo n.º 24
0
 def callback():
     cli.main(["--address=xyz", "--url=" + url, "register"])
Exemplo n.º 25
0
 def callback():
     cli.main([])
Exemplo n.º 26
0
 def test_register(self):
     args = ["--address=" + address_theta, "--url=" + url, "register"]
     self.assertTrue(cli.main(args))
Exemplo n.º 27
0
    def test_ping(self):
        args = ["--address=" + address_iota, "--url=" + url, "register"]
        self.assertTrue(cli.main(args))

        args = ["--address=" + address_iota, "--url=" + url, "ping"]
        self.assertTrue(cli.main(args))
Exemplo n.º 28
0
 def test_freespace(self):
     args = ["--config_path=" + tempfile.mktemp(), "freespace"]
     self.assertTrue(cli.main(args))
Exemplo n.º 29
0
 def test_version(self):
     args = ["--config_path=" + tempfile.mktemp(), "version"]
     self.assertTrue(cli.main(args))
Exemplo n.º 30
0
 def callback():
     cli.main(["--address=" + addresses["lambda"]])
Exemplo n.º 31
0
 def callback():
     cli.main(["--address=" + addresses["lambda"]])
Exemplo n.º 32
0
 def test_version(self):
     self.assertTrue(cli.main(["version"]))
Exemplo n.º 33
0
 def callback():
     cli.main(["--address=" + address_lambda])
Exemplo n.º 34
0
    def test_ping(self):
        args = ["--address=" + addresses["iota"], "--url=" + url, "register"]
        self.assertTrue(cli.main(args))

        args = ["--address=" + addresses["iota"], "--url=" + url, "ping"]
        self.assertTrue(cli.main(args))
Exemplo n.º 35
0
 def callback():
     cli.main([])
Exemplo n.º 36
0
 def callback():
     cli.main(["--address=" + address_alpha])