File tree 1 file changed +18
-36
lines changed
1 file changed +18
-36
lines changed Original file line number Diff line number Diff line change @@ -57,42 +57,24 @@ def d():
57
57
assert pid3 != pid2
58
58
59
59
60
- @pytest .mark .parametrize ("component_name" ,
61
- [
62
- "test@component" ,
63
- "test#123" ,
64
- "component/name" ,
65
- "component.name" ,
66
- "component!name" ,
67
- "component$name" ,
68
- "component%name" ,
69
- "component^name" ,
70
- "component&name" ,
71
- "component*name" ,
72
- "component(name" ,
73
- "component)name" ,
74
- "component+name" ,
75
- "component=name" ,
76
- "component{name" ,
77
- "component}name" ,
78
- "component[name" ,
79
- "component]name" ,
80
- "component:name" ,
81
- "component;name" ,
82
- "component'name" ,
83
- 'component"name' ,
84
- "component<name" ,
85
- "component>name" ,
86
- "component,name" ,
87
- "component?name" ,
88
- "component|name" ,
89
- "component\\ name" ,
90
- ])
60
+ @pytest .mark .parametrize (
61
+ "component_name" ,
62
+ [
63
+ "test@component" ,
64
+ "test#123" ,
65
+ "component/name" ,
66
+ "component.name" ,
67
+ "component!name" ,
68
+ "component$name" ,
69
+ "component%name" ,
70
+ "component^name" ,
71
+ "component&name" ,
72
+ "component*name" ,
73
+ ],
74
+ )
91
75
def test_deploy_with_special_characters (serve_instance , component_name ):
92
- """The function should not fail when the deployment name contains special characters.
93
- The deployment will use the names without special characters replaced by underscores.
94
- """
95
- signal = SignalActor .options (name = "some_signal" ).remote ()
76
+ """The function should not fail when the deployment name contains special characters."""
77
+ signal = SignalActor .options (name = f"signal-{ get_random_string ()} " ).remote ()
96
78
97
79
# V1 blocks on signal
98
80
@serve .deployment (name = "some_name" )
@@ -107,7 +89,7 @@ async def __call__(self):
107
89
# Check that deployment succeeds with special characters
108
90
with pytest .raises (Exception ) as exc_info :
109
91
serve .run (V1 .options (name = component_name ).bind (), name = "app" )
110
-
92
+
111
93
assert exc_info .type is None , f"Deployment failed with exception: { exc_info .value } "
112
94
113
95
You can’t perform that action at this time.
0 commit comments