File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
integration/tests/posit/connect Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11import time
22from pathlib import Path
33
4+ from packaging import version
5+
46from posit .connect import Client
57from posit .connect .system import SystemRuntimeCache
68from posit .connect .tasks import Task
79
10+ from . import CONNECT_VERSION
11+
812
913class TestSystem :
1014 @classmethod
@@ -53,9 +57,7 @@ def test_runtime_caches(self):
5357 raise TimeoutError ("Timeout while waiting for cache to deploy" )
5458
5559 jobs = self .content_item .jobs .fetch ()
56- print ("jobs:" , jobs )
5760 for job in jobs :
58- print ("job:" , job )
5961 if str (job ["status" ]) == "0" :
6062 # Stop for loop and restart while loop
6163 break
@@ -67,5 +69,9 @@ def test_runtime_caches(self):
6769
6870 # Check if the cache is deployed
6971 caches = self .client .system .caches .runtime .find ()
70- print ("caches:" , caches )
71- assert len (caches ) > 0
72+
73+ # https://github.com/rstudio/connect/pull/23148
74+ # Caches were added in v2023.05.0
75+ # Only assert cache length if the version is >= v2023.05.0
76+ if CONNECT_VERSION >= version .parse ("2023.05.0" ):
77+ assert len (caches ) > 0
You can’t perform that action at this time.
0 commit comments