~ubuntu-branches/ubuntu/raring/cinder/raring-updates

« back to all changes in this revision

Viewing changes to cinder/tests/test_service.py

Tags: upstream-2013.1~g2
ImportĀ upstreamĀ versionĀ 2013.1~g2

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
               help="Host to bind test service to"),
43
43
    cfg.IntOpt("test_service_listen_port",
44
44
               default=0,
45
 
               help="Port number to bind test service to"),
46
 
    ]
 
45
               help="Port number to bind test service to"), ]
47
46
 
48
47
flags.FLAGS.register_opts(test_service_opts)
49
48
 
131
130
                          'report_count': 0,
132
131
                          'availability_zone': 'nova'}
133
132
        service_ref = {'host': host,
134
 
                          'binary': binary,
135
 
                          'topic': topic,
136
 
                          'report_count': 0,
137
 
                          'availability_zone': 'nova',
138
 
                          'id': 1}
 
133
                       'binary': binary,
 
134
                       'topic': topic,
 
135
                       'report_count': 0,
 
136
                       'availability_zone': 'nova',
 
137
                       'id': 1}
139
138
 
140
139
        service.db.service_get_by_args(mox.IgnoreArg(),
141
 
                                      host,
142
 
                                      binary).AndRaise(exception.NotFound())
 
140
                                       host,
 
141
                                       binary).AndRaise(exception.NotFound())
143
142
        service.db.service_create(mox.IgnoreArg(),
144
143
                                  service_create).AndReturn(service_ref)
145
144
        service.db.service_get(mox.IgnoreArg(),
164
163
                          'report_count': 0,
165
164
                          'availability_zone': 'nova'}
166
165
        service_ref = {'host': host,
167
 
                          'binary': binary,
168
 
                          'topic': topic,
169
 
                          'report_count': 0,
170
 
                          'availability_zone': 'nova',
171
 
                          'id': 1}
 
166
                       'binary': binary,
 
167
                       'topic': topic,
 
168
                       'report_count': 0,
 
169
                       'availability_zone': 'nova',
 
170
                       'id': 1}
172
171
 
173
172
        service.db.service_get_by_args(mox.IgnoreArg(),
174
 
                                      host,
175
 
                                      binary).AndRaise(exception.NotFound())
 
173
                                       host,
 
174
                                       binary).AndRaise(exception.NotFound())
176
175
        service.db.service_create(mox.IgnoreArg(),
177
176
                                  service_create).AndReturn(service_ref)
178
177
        service.db.service_get(mox.IgnoreArg(),