def testMain(self): temp_dir = tempfile.mkdtemp(prefix='kube-test-hist-') try: tests_json = os.path.join(temp_dir, 'tests.json') with open(tests_json, 'w') as f: json.dump(TEST_DATA, f) gen_html.main(['--suites', '--prefixes', ',rel,deb', '--output-dir', temp_dir, '--input', tests_json]) for page in ('index', 'suite-kubernetes-debug', 'tests', 'tests-rel', 'tests-deb'): self.assertTrue(os.path.exists('%s/%s.html' % (temp_dir, page))) finally: shutil.rmtree(temp_dir)
def testMain(self): """Test main() creates pages.""" temp_dir = tempfile.mkdtemp(prefix='kube-test-hist-') try: tests_json = os.path.join(temp_dir, 'tests.json') with open(tests_json, 'w') as buf: json.dump(TEST_DATA, buf) gen_html.main(tests_json, temp_dir) for page in ('index', 'tests-kubernetes', 'suite-kubernetes-release', 'suite-kubernetes-debug'): self.assertTrue(os.path.exists('%s/%s.html' % (temp_dir, page))) finally: shutil.rmtree(temp_dir)
def testMain(self): """Test main() creates pages.""" temp_dir = tempfile.mkdtemp(prefix='kube-test-hist-') try: tests_json = os.path.join(temp_dir, 'tests.json') with open(tests_json, 'w') as buf: json.dump(TEST_DATA, buf) gen_html.main(tests_json, temp_dir) for page in ( 'index', 'tests-kubernetes', 'suite-kubernetes-release', 'suite-kubernetes-debug'): self.assertTrue(os.path.exists('%s/%s.html' % (temp_dir, page))) finally: shutil.rmtree(temp_dir)
def testMain(self): temp_dir = tempfile.mkdtemp(prefix='kube-test-hist-') try: tests_json = os.path.join(temp_dir, 'tests.json') with open(tests_json, 'w') as f: json.dump(TEST_DATA, f) gen_html.main([ '--suites', '--prefixes', ',rel,deb', '--output-dir', temp_dir, '--input', tests_json ]) for page in ('index', 'suite-kubernetes-debug', 'tests', 'tests-rel', 'tests-deb'): self.assertTrue(os.path.exists('%s/%s.html' % (temp_dir, page))) finally: shutil.rmtree(temp_dir)
def test_main(self): """Test main() creates pages.""" temp_dir = tempfile.mkdtemp(prefix='kube-test-hist-') try: tests_json = os.path.join(temp_dir, 'tests.json') with open(tests_json, 'w') as buf: json.dump(TEST_DATA, buf) buckets_yaml = os.path.join(temp_dir, 'buckets.yaml') with open(buckets_yaml, 'w') as buf: yaml.dump(TEST_BUCKETS_DATA, buf) configmap_yaml = os.path.join(temp_dir, 'configs.yaml') with open(configmap_yaml, 'w') as buf: yaml.dump(TEST_CONFIGMAP_DATA, buf) gen_html.main(tests_json, buckets_yaml, temp_dir, configmap_yaml) for page in ('index', 'suite-kubernetes-release', 'suite-kubernetes-debug'): self.assertTrue(os.path.exists('%s/%s.html' % (temp_dir, page))) finally: shutil.rmtree(temp_dir)
def test_main(self): """Test main() creates pages.""" temp_dir = tempfile.mkdtemp(prefix='kube-test-hist-') try: tests_json = os.path.join(temp_dir, 'tests.json') with open(tests_json, 'w') as buf: json.dump(TEST_DATA, buf) buckets_yaml = os.path.join(temp_dir, 'buckets.yaml') with open(buckets_yaml, 'w') as buf: yaml.dump(TEST_BUCKETS_DATA, buf) configmap_yaml = os.path.join(temp_dir, 'configs.yaml') with open(configmap_yaml, 'w') as buf: yaml.dump(TEST_CONFIGMAP_DATA, buf) gen_html.main(tests_json, buckets_yaml, temp_dir, configmap_yaml) for page in ( 'index', 'suite-kubernetes-release', 'suite-kubernetes-debug'): self.assertTrue(os.path.exists('%s/%s.html' % (temp_dir, page))) finally: shutil.rmtree(temp_dir)