aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/tests/network-attach/04_network_attach_baddomain_neg.py
blob: bcc4c2b32ff2d425178d67800c20691710f016c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python

# Copyright (C) International Business Machines Corp., 2005
# Author: Murillo F. Bernardes <mfb@br.ibm.com>

from XmTestLib import *

status, output = traceCommand("xm network-attach NOT-EXIST")

eyecatcher = "Error"
where = output.find(eyecatcher)
if status == 0:
    FAIL("xm network-attach returned bad status, expected non 0, status is: %i" % status )
elif where == -1:
    FAIL("xm network-attach returned bad output, expected Error, output is: %s" % output )