summaryrefslogtreecommitdiff
path: root/scripts/tests/IceBox/admin.py
blob: cd36e7475f77bd53bf1dd3038d224d6c057c1331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

class IceBoxAdminTestCase(ClientServerTestCase):

    def runClientSide(self, current):

        admin = IceBoxAdmin(args = ['--Ice.Config="{testdir}/config.admin"'])
        current.write("testing service stop...")
        admin.run(current, args=['stop', 'TestService'])
        current.writeln("ok")
        current.write("testing service start...")
        admin.run(current, args=['start', 'TestService'])
        current.writeln("ok")
        current.write("testing shutdown...")
        admin.run(current, args=['shutdown'])
        current.writeln("ok")

TestSuite(__name__, [
    ClientServerTestCase(server=IceBox(args=['--Ice.Config="{testdir}/config.icebox"'])),
    IceBoxAdminTestCase("iceboxadmin", server=IceBox(args=['--Ice.Config="{testdir}/config.icebox"'])),
], libDirs=["testservice"], runOnMainThread=True, options={ "ipv6" : [False], "mx" : [False] }, multihost=False)