Ignore:
Timestamp:
01/06/06 16:50:32 (13 years ago)
Author:
spascoe
Message:

Implemented higher level auth message passing (the receiver doesn't
need to know the message length). The client will use this mechanism to
send the private string. This is working with stand alone bbftp client/server.

Embedded bbftpd is broken until I make corresponding
changes to the python API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/test/test_bbftpd.py

    r1077 r1078  
    7171        self._stopServer(pid) 
    7272 
    73         self.assert_(self._findLines(['Received Auth handshake: NDG-Delivery-server %s' % self.VERSION], output)) 
     73        self.assert_(self._findLines(['Received Auth handshake: NDG-Delivery-server %s.*' % self.VERSION], output)) 
    7474 
    7575        lines = self._readSyslog() 
    7676        self.assert_(self._findLines(['.*Received auth message: NDG-Delivery-client %s.*' % self.VERSION], lines)) 
    7777 
     78    def testPrivateStr(self): 
     79        """Connect with a private string.  Check syslog for string value. 
     80        """ 
     81 
     82        self._startServer() 
     83        pid = self._getServerPid() 
     84 
     85        fh = self._runClient('dir .', privatestr="Tester calling") 
     86        output = fh.read() 
     87 
     88        self._stopServer(pid) 
     89 
     90        lines = self._readSyslog() 
     91        self.assert_(self._findLines(['.*Private string: Tester calling.*'], lines)) 
    7892 
    7993    def testDir(self): 
     
    213227        return ''.join(filtered_log) 
    214228 
    215     def _runClient(self, cmd, debug=False, user="testcase"): 
     229    def _runClient(self, cmd, debug=False, user="testcase", privatestr=None): 
    216230        """Run the client. 
    217231        """ 
     
    221235        else: 
    222236            f = "-m" 
    223          
    224         fh = os.popen('%s %s -u %s -e %s localhost' % (self.BBFTP, f, user, repr(cmd))) 
     237 
     238        if privatestr: 
     239            p = '-P %s' % repr(privatestr) 
     240        else: 
     241            p = '' 
     242         
     243        fh = os.popen('%s %s -u %s %s -e %s localhost' % (self.BBFTP, f, user, p, repr(cmd))) 
    225244        return fh 
    226245 
Note: See TracChangeset for help on using the changeset viewer.