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))
def callback(): cli.main([ "--address=" + address_mu, "--url=" + url, "poll", "--register_address", "--delay=5", "--limit=xyz" ])
def callback(): cli.main([ "--url=" + url, "--config_path=" + tempfile.mktemp(), "poll", "--register_address", "--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))
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))
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))
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))
def test_poll(self): args = [ "--address=" + address_eta, "--url=" + url, "poll", "--register_address", "--delay=5", "--limit=60" ] self.assertTrue(cli.main(args))
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))
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
def callback(): cli.main(["--address=xyz", "--url=" + url, "register"])
def test_register(self): args = ["--address=" + addresses["theta"], "--url=" + url, "register"] self.assertTrue(cli.main(args))
def callback(): cli.main([])
def test_register(self): args = ["--address=" + address_theta, "--url=" + url, "register"] self.assertTrue(cli.main(args))
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))
def test_freespace(self): args = ["--config_path=" + tempfile.mktemp(), "freespace"] self.assertTrue(cli.main(args))
def test_version(self): args = ["--config_path=" + tempfile.mktemp(), "version"] self.assertTrue(cli.main(args))
def callback(): cli.main(["--address=" + addresses["lambda"]])
def test_version(self): self.assertTrue(cli.main(["version"]))
def callback(): cli.main(["--address=" + address_lambda])
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(["--address=" + address_alpha])