Skip to content

Commit

Permalink
Merge pull request #1258 from GoogleCloudPlatform/fix-integration
Browse files Browse the repository at this point in the history
Fix integration test.
  • Loading branch information
yuyantingzero authored Dec 20, 2016
2 parents 6345ee7 + 539dd16 commit f24c699
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions perfkitbenchmarker/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""Functions and classes to make testing easier."""

import os
import mock

from perfkitbenchmarker import benchmark_spec
from perfkitbenchmarker import flags
Expand Down Expand Up @@ -102,11 +103,12 @@ def assertDiskMounts(benchmark_config, mount_point):
assert len(benchmark_config['vm_groups']) == 1
vm_group = benchmark_config['vm_groups'].itervalues().next()
assert vm_group.get('num_vms', 1) == 1

m = mock.MagicMock()
m.BENCHMARK_NAME = _BENCHMARK_NAME
config_spec = benchmark_config_spec.BenchmarkConfigSpec(
_BENCHMARK_NAME, flag_values=flags.FLAGS, **benchmark_config)
spec = benchmark_spec.BenchmarkSpec(config_spec, _BENCHMARK_NAME,
_BENCHMARK_UID)
spec = benchmark_spec.BenchmarkSpec(
m, config_spec, _BENCHMARK_UID)
with spec.RedirectGlobalFlags():
try:
spec.ConstructVirtualMachines()
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/azure_disk_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def testPremiumStorage(self):
'vm_spec': {
'Azure': {
'machine_type': 'Standard_DS2',
'zone': 'East US'
'zone': 'eastus'
}
},
'disk_spec': {
Expand All @@ -71,7 +71,7 @@ def testStandardDisk(self):
'vm_spec': {
'Azure': {
'machine_type': 'Standard_D2',
'zone': 'East US'
'zone': 'eastus'
}
},
'disk_spec': {
Expand All @@ -93,7 +93,7 @@ def testLocalSSD(self):
'vm_spec': {
'Azure': {
'machine_type': 'Standard_D1',
'zone': 'East US'
'zone': 'eastus'
}
},
'disk_spec': {
Expand Down

0 comments on commit f24c699

Please sign in to comment.