From dd3c556ad70cc4d015f72e72a6487da9619589a6 Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 18 Jun 2018 13:20:18 -0700 Subject: [PATCH] fix: Making integration tests work on Windows (#494) --- .gitignore | 2 +- .../invoke/runtimes/test_with_runtime_zips.py | 12 +++++++----- .../runtimes/java8/target/HelloWorld-1.0.jar | Bin 0 -> 9562 bytes 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 tests/integration/testdata/invoke/runtimes/java8/target/HelloWorld-1.0.jar diff --git a/.gitignore b/.gitignore index 5dbf0258cf..90ecde5dee 100644 --- a/.gitignore +++ b/.gitignore @@ -283,7 +283,7 @@ instance/ docs/_build/ # PyBuilder -target/ +/target/ # Jupyter Notebook .ipynb_checkpoints diff --git a/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py b/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py index 97c30c5df1..6cb8b23938 100644 --- a/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py +++ b/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py @@ -13,14 +13,16 @@ def setUp(self): self.template_path = os.path.join(self.test_data_path, "invoke", "runtimes", "template.yaml") - self.events_file = tempfile.NamedTemporaryFile() - self.events_file.write('"yolo"') # Just empty event - self.events_file.flush() + # Don't delete on close. Need the file to be present for tests to run. + events_file = tempfile.NamedTemporaryFile(delete=False) + events_file.write(b'"yolo"') # Just empty event + events_file.flush() + events_file.close() - self.events_file_path = self.events_file.name + self.events_file_path = events_file.name def tearDown(self): - self.events_file.close() + os.remove(self.events_file_path) @parameterized.expand([ param("Go1xFunction"), diff --git a/tests/integration/testdata/invoke/runtimes/java8/target/HelloWorld-1.0.jar b/tests/integration/testdata/invoke/runtimes/java8/target/HelloWorld-1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..444b5bde068294faf71ae8f35270c4be0e69bcb7 GIT binary patch literal 9562 zcmbVR2Rzm77ss_-lD+pTBO^P7Ywt~{>`}P7Mo30RG85T^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