Exemplo n.º 1
0
def runTests(host, port=None, listenport=None):
    generateTestData()
    node = FludNode(port=listenport)
    if port == None:
        port = node.config.port
    node.run()
    d = testID(node, host, port)
    d.addBoth(cleanup, node)
    node.join()
Exemplo n.º 2
0
def runTests(host, port=None, listenport=None):
    host = getCanonicalIP(host)
    node = FludNode(port=listenport)
    if port == None:
        port = node.config.port
    logger.info("testing against %s:%s, localport=%s" % (host, 
        port, listenport))
    node.run()
    d = testGetID(node, host, port)
    d.addBoth(cleanup, node)
    #testkFindVal("blah", node.config.Ku, node, host, port)
    node.join()
Exemplo n.º 3
0
def runTests(host, port=None, listenport=None):
    num = CONCURRENT
    #num = 5
    node = FludNode(port=listenport)
    if port == None:
        port = node.config.port
    node.run()

    d = testGetID(node, host, port, CONCURRENT)
    d.addCallback(suitesuccess)
    d.addErrback(suiteerror)
    d.addBoth(cleanup, node)

    node.join()
Exemplo n.º 4
0
def runTests(host, port=None, listenport=None):
    (largeFilename, largeFilekey) = generateTestData(512000)
    (smallFilename, smallFilekey) = generateTestData(5120)
    aggFiles = []
    for i in range(4):
        aggFiles.append(generateTestData(4096))
    node = FludNode(port=listenport)
    if port == None:
        port = node.config.port
    node.run()
    d = testID(node, host, port)
    d.addCallback(testSTORE, largeFilename, largeFilekey, node, host, port)
    d.addCallback(testSTORE, smallFilename, smallFilekey, node, host, port)
    d.addCallback(testAggSTORE, aggFiles, node, host, port)
    d.addBoth(cleanup, node, [i[0] for i in aggFiles] + [largeFilename, 
        smallFilename])
    node.join()
Exemplo n.º 5
0
def runTests(host, port=None, listenport=None):
    num = CONCURRENT
    #num = 5
    global files, node
    files = createFakeData()
    node = FludNode(port=listenport)
    if port == None:
        port = node.config.port
    node.run()

    if num > len(files):
        num = len(files)
    
    d1 = testID(host, port, num)
    d1.addCallback(suitesuccess)
    d1.addErrback(suiteerror)
    d1.addBoth(cleanup)

    #nku = FludRSA.importPublicKey({'e': 65537L, 'n': 138646504113696863667807411690225283099791076530135000331764542300161152585426296356409290228001197773401729468267448145387041995053893737880473447042984919037843163552727823101445272608470814297563395471329917904393936481407769396601027233955938405001434483474847834031774504827822809611707032477570548179411L})
    #d2 = testSTORE(nku, node, host, port, files, num)
    #d2.addErrback(suiteerror, 'failed at %s' % d2.testname)

    node.join()
Exemplo n.º 6
0
def runTests(host, port, listenport=None):
    f1 = generateTestFile(5120)
    f2 = generateTestFile(5120)
    f3 = f2+".dup"
    shutil.copy(f2, f3)
    f4 = generateTestFile(513000)
    f5 = generateTestFile(513000)
    f6 = f5+".dup"
    shutil.copy(f5, f6)

    node = FludNode(port=listenport)
    if port == None:
        port = node.config.port
    node.run()
    node.connectViaGateway(host, port)

    d = doTests(node, [f1, f2], [f4, f5], [f2, f3], [f5, f6])
    d.addBoth(cleanup, node, [f1, f2, f3, f4, f5, f6])
    node.join()