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))
Exemple #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))
    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))
Exemple #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))
Exemple #5
0
 def callback():
     cli.main([
         "--address=" + address_mu,
         "--url=" + url,
         "poll",
         "--register_address",
         "--delay=5",
         "--limit=xyz"
     ])
Exemple #6
0
 def callback():
     cli.main([
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "poll",
         "--register_address",
         "--delay=5",
         "--limit=xyz"
     ])
Exemple #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"
     ])
 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"
     ])
    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))
Exemple #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))
Exemple #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))
 def test_version(self):
     args = [
         "--nop2p",
         "--config_path=" + tempfile.mktemp(),
         "version"
     ]
     self.assertTrue(cli.main(args))
 def test_register(self):
     args = [
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "register"
     ]
     self.assertTrue(cli.main(args))
Exemple #14
0
 def test_register(self):
     args = [
         "--url=" + url,
         "--config_path=" + tempfile.mktemp(),
         "register"
     ]
     self.assertTrue(cli.main(args))
    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))
Exemple #16
0
 def test_poll(self):
     args = [
         "--address=" + address_eta,
         "--url=" + url,
         "poll",
         "--register_address",
         "--delay=5",
         "--limit=60"
     ]
     self.assertTrue(cli.main(args))
Exemple #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))
    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))
 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))
Exemple #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))
#!/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
Exemple #22
0
 def callback():
     cli.main(["--address=xyz", "--url=" + url, "register"])
Exemple #23
0
 def test_register(self):
     args = ["--address=" + addresses["theta"], "--url=" + url, "register"]
     self.assertTrue(cli.main(args))
Exemple #24
0
 def callback():
     cli.main(["--address=xyz", "--url=" + url, "register"])
Exemple #25
0
 def callback():
     cli.main([])
Exemple #26
0
 def test_register(self):
     args = ["--address=" + address_theta, "--url=" + url, "register"]
     self.assertTrue(cli.main(args))
Exemple #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))
Exemple #28
0
 def test_freespace(self):
     args = ["--config_path=" + tempfile.mktemp(), "freespace"]
     self.assertTrue(cli.main(args))
Exemple #29
0
 def test_version(self):
     args = ["--config_path=" + tempfile.mktemp(), "version"]
     self.assertTrue(cli.main(args))
Exemple #30
0
 def callback():
     cli.main(["--address=" + addresses["lambda"]])
 def callback():
     cli.main(["--address=" + addresses["lambda"]])
Exemple #32
0
 def test_version(self):
     self.assertTrue(cli.main(["version"]))
Exemple #33
0
 def callback():
     cli.main(["--address=" + address_lambda])
Exemple #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))
 def callback():
     cli.main([])
 def callback():
     cli.main(["--address=" + address_alpha])