Revision 9738ca94

b/qa/ganeti-qa.py
106 106
  if qa_config.TestEnabled('cluster-reserved-lvs'):
107 107
    RunTest(qa_cluster.TestClusterReservedLvs)
108 108

  
109
  if qa_config.TestEnabled("cluster-modify"):
110
    RunTest(qa_cluster.TestClusterModifyBe)
111
    # TODO: add more cluster modify tests
112

  
109 113
  if qa_config.TestEnabled('cluster-rename'):
110 114
    RunTest(qa_cluster.TestClusterRename)
111 115

  
b/qa/qa-sample.json
49 49
    "cluster-destroy": true,
50 50
    "cluster-rename": true,
51 51
    "cluster-reserved-lvs": true,
52
    "cluster-modify": true,
52 53

  
53 54
    "node-info": true,
54 55
    "node-volumes": true,
b/qa/qa_cluster.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2007 Google Inc.
4
# Copyright (C) 2007, 2010 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
168 168
                         utils.ShellQuoteArgs(cmd)).wait(), rcode)
169 169

  
170 170

  
171
def TestClusterModifyBe():
172
  """gnt-cluster modify -B"""
173
  master = qa_config.GetMasterNode()
174

  
175
  for rcode, cmd in [
176
    # mem
177
    (0, ["gnt-cluster", "modify", "-B", "memory=256"]),
178
    (0, ["sh", "-c", "gnt-cluster info|grep '^ *memory: 256$'"]),
179
    (1, ["gnt-cluster", "modify", "-B", "memory=a"]),
180
    (0, ["gnt-cluster", "modify", "-B", "memory=128"]),
181
    (0, ["sh", "-c", "gnt-cluster info|grep '^ *memory: 128$'"]),
182
    # vcpus
183
    (0, ["gnt-cluster", "modify", "-B", "vcpus=4"]),
184
    (0, ["sh", "-c", "gnt-cluster info|grep '^ *vcpus: 4$'"]),
185
    (1, ["gnt-cluster", "modify", "-B", "vcpus=a"]),
186
    (0, ["gnt-cluster", "modify", "-B", "vcpus=1"]),
187
    (0, ["sh", "-c", "gnt-cluster info|grep '^ *vcpus: 1$'"]),
188
    # auto_balance
189
    (0, ["gnt-cluster", "modify", "-B", "auto_balance=False"]),
190
    (0, ["sh", "-c", "gnt-cluster info|grep '^ *auto_balance: False$'"]),
191
    (1, ["gnt-cluster", "modify", "-B", "auto_balance=1"]),
192
    (0, ["gnt-cluster", "modify", "-B", "auto_balance=True"]),
193
    (0, ["sh", "-c", "gnt-cluster info|grep '^ *auto_balance: True$'"]),
194
    ]:
195
    AssertEqual(StartSSH(master['primary'],
196
                         utils.ShellQuoteArgs(cmd)).wait(), rcode)
197

  
198

  
171 199
def TestClusterInfo():
172 200
  """gnt-cluster info"""
173 201
  master = qa_config.GetMasterNode()

Also available in: Unified diff