!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/4Suite/tests/Server/Server/SCore/   drwxr-xr-x
Free 4.95 GB of 27.03 GB (18.31%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_temp_files.py (1.77 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import time

import test_helper

from Ft.Server.Common import Schema

def _init(tester):
    tester.startTest("Clean and Init")
    repo = test_helper.GetRepo(tester)
    if repo.hasResource('/test'):
        repo.deleteResource('/test')

    test = repo.createContainer('/test',1)

    test.createDocument('doc1',DOC1)
    test.createDocument('doc2',DOC2)

    repo.txCommit()
    tester.testDone()


def test_temp_files(tester):
    tester.startTest("Create a temp file (should take ~20 secs)")
    repo = test_helper.GetRepo(tester)

    repo.setPathTemporary('/test/doc1',10)
    doc2 = repo.fetchResource('/test/doc2')
    doc2.markTemporary(20)

    m = repo.getModel()
    tester.compare(1,len(m.complete('/test/doc1',Schema.TIME_TO_LIVE,None)))
    tester.compare(1,len(m.complete('/test/doc2',Schema.TIME_TO_LIVE,None)))
    repo.txCommit()


    time.sleep(10)
    #Test as anon to make sure we can do what we need to unprivileged
    repo = test_helper.GetAnonRepo(tester)
    repo.purgeTemporaryResources()

    tester.compare(0,repo.hasResource('/test/doc1'))
    doc2 = repo.fetchResource('/test/doc2')
    m = repo.getModel()
    tester.compare(0,len(m.complete('/test/doc1',Schema.TIME_TO_LIVE,None)))
    tester.compare(1,len(m.complete('/test/doc2',Schema.TIME_TO_LIVE,None)))
    repo.txCommit()

    time.sleep(10)
    repo = test_helper.GetRepo(tester)
    repo.purgeTemporaryResources()

    tester.compare(0,repo.hasResource('/test/doc2'))
    m = repo.getModel()
    tester.compare(0,len(m.complete('/test/doc2',Schema.TIME_TO_LIVE,None)))
    repo.txCommit()

    tester.testDone()


    pass



DOC1="""<docelem v='foo'/>"""
DOC2="""<docelem w='foo'/>"""


def Test(tester):
    tester.startGroup("Temporary Files")
    _init(tester)
    test_temp_files(tester)
    tester.groupDone()


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0033 ]--