summaryrefslogtreecommitdiff
path: root/scripts/tests/IceBox/admin.py
blob: c194e32bf9981820aaa2c13beac0f3e168e41964 (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
30
31
32
33
# -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-2018 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("{testdir}/config.icebox")),
        IceBoxAdminTestCase("iceboxadmin", server=IceBox("{testdir}/config.icebox")),
    ],
    libDirs=["testservice"],
    runOnMainThread=True,
    options={ "ipv6" : [False], "mx" : [False], "cpp11" : [False] },
    multihost=False)