public void VerifyGetBundleDownloadPathReturnCorrectPath() { var downloadPath = ExtensionBundleHelper.GetBundleDownloadPath("BundleId"); var expectedPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".azure-functions-core-tools", "Functions", "ExtensionBundles", "BundleId"); Assert.Equal(expectedPath, downloadPath); }
private void SetBundlesEnvironmentVariables() { var bundleId = ExtensionBundleHelper.GetExtensionBundleOptions(_hostOptions).Id; if (!string.IsNullOrEmpty(bundleId)) { Environment.SetEnvironmentVariable("AzureFunctionsJobHost__extensionBundle__downloadPath", ExtensionBundleHelper.GetBundleDownloadPath(bundleId)); Environment.SetEnvironmentVariable("AzureFunctionsJobHost__extensionBundle__ensureLatest", "true"); } }