Browse Source

Merge "ensure samples folder exists for microversion"

changes/41/823941/5
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
e6f9d1f432
  1. 7
      nova/tests/functional/api_samples_test_base.py

7
nova/tests/functional/api_samples_test_base.py

@ -135,8 +135,11 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase):
outf.write(data)
def _write_sample(self, name, data):
with open(self._get_sample(
name, self.microversion), 'w') as outf:
sample_file = self._get_sample(name, self.microversion)
os.makedirs(os.path.dirname(sample_file), exist_ok = True)
with open(sample_file, 'w') as outf:
outf.write(data)
def _compare_result(self, expected, result, result_str):

Loading…
Cancel
Save