~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/test/IceGrid/admin/run.py

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
# **********************************************************************
3
3
#
4
 
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
 
4
# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
5
5
#
6
6
# This copy of Ice is licensed to you under the terms described in the
7
7
# ICE_LICENSE file included in this distribution.
20
20
sys.path.append(path[0])
21
21
from scripts import *
22
22
 
 
23
if not TestUtil.isWin32() and os.getuid() == 0:
 
24
    print
 
25
    print "*** can't run test as root ***"
 
26
    print
 
27
    sys.exit(0)
 
28
 
23
29
testdir = os.getcwd();
24
30
 
 
31
router = TestUtil.getGlacier2Router()
 
32
targets = []
 
33
if TestUtil.appverifier:
 
34
    targets = [ TestUtil.getIceGridNode(), TestUtil.getIceGridRegistry(), router]
 
35
    TestUtil.setAppVerifierSettings(targets)
 
36
 
25
37
registryProcs = IceGridAdmin.startIceGridRegistry(testdir)
26
38
nodeProc = IceGridAdmin.startIceGridNode(testdir)
27
39
 
28
40
print "starting glacier2...",
29
41
sys.stdout.flush()
30
 
router = os.path.join(TestUtil.getCppBinDir(), "glacier2router")
 
42
 
31
43
args = ' --Glacier2.SessionTimeout=5' + \
32
 
       ' --Glacier2.Client.Endpoints="default -p 12347 -t 10000"' + \
33
 
       ' --Glacier2.Server.Endpoints="tcp -h 127.0.0.1 -t 10000"' \
 
44
       ' --Glacier2.Client.Endpoints="default -p 12347"' + \
 
45
       ' --Glacier2.Server.Endpoints="tcp -h 127.0.0.1"' \
34
46
       ' --Glacier2.SessionManager=IceGrid/AdminSessionManager' + \
35
47
       ' --Glacier2.PermissionsVerifier=Glacier2/NullPermissionsVerifier' + \
36
48
       ' --Glacier2.SSLSessionManager=IceGrid/AdminSSLSessionManager' + \
44
56
sys.stdout.flush()
45
57
 
46
58
# Direct registry connection with username/password
47
 
icegridadmin = os.path.join(TestUtil.getCppBinDir(), "icegridadmin")
 
59
icegridadmin = TestUtil.getIceGridAdmin()
48
60
args = ' --Ice.Default.Locator="IceGrid/Locator:default -p 12010"' + \
49
61
       ' --IceGridAdmin.Username=demo' + \
50
62
       ' --IceGridAdmin.Password=dummy'
73
85
    sys.stdout.flush()
74
86
 
75
87
    # Direct registry connection with SSL
76
 
    icegridadmin = os.path.join(TestUtil.getCppBinDir(), "icegridadmin")
 
88
    icegridadmin = TestUtil.getIceGridAdmin()
77
89
    args = ' --Ice.Default.Locator="IceGrid/Locator:default -p 12010" --ssl'
78
90
    admin = TestUtil.startClient(icegridadmin, args, None, None, False)
79
91
    admin.expect('>>> ')
95
107
 
96
108
print "testing commands...",
97
109
sys.stdout.flush()
98
 
icegridadmin = os.path.join(TestUtil.getCppBinDir(), "icegridadmin")
 
110
icegridadmin = TestUtil.getIceGridAdmin()
99
111
args = ' --Ice.Default.Locator="IceGrid/Locator:default -p 12010"' + \
100
112
       ' --IceGridAdmin.Username=demo' + \
101
113
       ' --IceGridAdmin.Password=dummy'
240
252
IceGridAdmin.iceGridAdmin("node shutdown localnode")
241
253
IceGridAdmin.shutdownIceGridRegistry(registryProcs)
242
254
nodeProc.waitTestSuccess()
 
255
 
 
256
if TestUtil.appverifier:
 
257
    TestUtil.appVerifierAfterTestEnd(targets)
 
258