Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions workers/python/prodV4/worker.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"defaultRuntimeVersion":"3.12",
"supportedOperatingSystems":["LINUX", "OSX", "WINDOWS"],
"supportedRuntimeVersions":["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
"minimumSupportedRuntimeVersion":"3.9",
"supportedArchitectures":["X64", "X86", "Arm64"],
"extensions":[".py"],
"defaultExecutablePath":"python",
Expand Down
41 changes: 41 additions & 0 deletions workers/tests/endtoend/test_eol_log.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import re
import sys
import time
import typing

from tests.utils import testutils
from unittest.case import skipIf

REQUEST_TIMEOUT_SEC = 5


@skipIf(sys.version_info.minor >= 9,
'3.9+ is supported.')
class TestEOLFunctions(testutils.WebHostTestCase):

@classmethod
def get_script_dir(cls):
return testutils.E2E_TESTS_FOLDER / 'timer_functions'

def test_timer(self):
time.sleep(1)
# Checking webhost status.
r = self.webhost.request('GET', '', no_prefix=True,
timeout=REQUEST_TIMEOUT_SEC)
self.assertTrue(r.ok)

def check_log_timer(self, host_out: typing.List[str]):
self.assertEqual(host_out.count("This timer trigger function executed "
"successfully"), 1)
pattern = (
r"The configured runtime version '.*' "
r"for language '.*' "
r"is lower than the minimum supported version '.*'\. "
r"Please update to a supported version\. "
r"Visit aka\.ms/supported-language-versions for more information\."
)

found = any(re.search(pattern, log) for log in host_out)
self.assertTrue(found)
Loading