~registry/pykickstart/trunk

« back to all changes in this revision

Viewing changes to tests/commands/zfcp.py

  • Committer: Chris Lumens
  • Date: 2014-10-22 14:19:44 UTC
  • Revision ID: git-v1:982498c0647c4bc3b4460209d4a76698c0eb6f8c
Add a note that the repo has moved.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# Chris Lumens <clumens@redhat.com>
3
 
#
4
 
# Copyright 2009 Red Hat, Inc.
5
 
#
6
 
# This copyrighted material is made available to anyone wishing to use, modify,
7
 
# copy, or redistribute it subject to the terms and conditions of the GNU
8
 
# General Public License v.2.  This program is distributed in the hope that it
9
 
# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
10
 
# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 
# See the GNU General Public License for more details.
12
 
#
13
 
# You should have received a copy of the GNU General Public License along with
14
 
# this program; if not, write to the Free Software Foundation, Inc., 51
15
 
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  Any Red Hat
16
 
# trademarks that are incorporated in the source code or documentation are not
17
 
# subject to the GNU General Public License and may only be used or replicated
18
 
# with the express permission of Red Hat, Inc.
19
 
#
20
 
 
21
 
import unittest
22
 
from tests.baseclass import *
23
 
 
24
 
class FC3_TestCase(CommandTest):
25
 
    command = "zfcp"
26
 
 
27
 
    def runTest(self):
28
 
        # pass
29
 
        self.assert_parse("zfcp --devnum=1 --wwpn=2 --fcplun=3 --scsiid=4 --scsilun=5",
30
 
                          "zfcp --devnum=1 --wwpn=2 --fcplun=3 --scsiid=4 --scsilun=5\n")
31
 
 
32
 
        # fail
33
 
        self.assert_parse_error("zfcp --devnum=1 --wwpn=2 --fcplun=3 --scsiid=4",
34
 
                                KickstartValueError)
35
 
        self.assert_parse_error("zfcp --devnum=1 --wwpn=2 --fcplun=3 --scsilun=4",
36
 
                                KickstartValueError)
37
 
        self.assert_parse_error("zfcp --devnum=1 --wwpn=2 --fcplun=3",
38
 
                                KickstartValueError)
39
 
        self.assert_parse_error("zfcp --devnum --wwpn --fcplun --scsiid --scsilun",
40
 
                                KickstartParseError)
41
 
 
42
 
class F12_TestCase(FC3_TestCase):
43
 
    def runTest(self):
44
 
        # pass
45
 
        self.assert_parse("zfcp --devnum=1 --wwpn=2 --fcplun=3",
46
 
                          "zfcp --devnum=1 --wwpn=2 --fcplun=3\n")
47
 
 
48
 
        # deprecated
49
 
        self.assert_deprecated("zfcp", "--scsiid")
50
 
        self.assert_deprecated("zfcp", "--scsilun")
51
 
 
52
 
class F14_TestCase(F12_TestCase):
53
 
    def runTest(self):
54
 
        F12_TestCase.runTest(self)
55
 
 
56
 
        self.assert_removed("zfcp", "--scsiid")
57
 
        self.assert_removed("zfcp", "--scsilun")
58
 
 
59
 
if __name__ == "__main__":
60
 
    unittest.main()