@@ -32,12 +32,12 @@ func TestCLIInputFromSource(t *testing.T) {
3232
3333 ServiceFromAPI (& input , source )
3434
35- require .Equal (t , "web_service" , * input .Type )
35+ require .Equal (t , servicetypes . ServiceType ( "web_service" ) , * input .Type )
3636 require .Equal (t , "https://github.com/renderinc/api" , * input .Repo )
3737 require .Equal (t , "master" , * input .Branch )
3838 require .Equal (t , "services/api" , * input .RootDirectory )
3939 require .Equal (t , "evm-123" , * input .EnvironmentID )
40- require .Equal (t , "node" , * input .Runtime )
40+ require .Equal (t , servicetypes . ServiceRuntime ( "node" ) , * input .Runtime )
4141 })
4242
4343 t .Run ("hydrates image-backed defaults" , func (t * testing.T ) {
@@ -61,7 +61,7 @@ func TestCLIInputFromSource(t *testing.T) {
6161
6262 require .Equal (t , "docker.io/org/app:latest" , * input .Image )
6363 require .Equal (t , "rgc-123" , * input .RegistryCredential )
64- require .Equal (t , "image" , * input .Runtime )
64+ require .Equal (t , servicetypes . ServiceRuntime ( "image" ) , * input .Runtime )
6565 })
6666
6767 t .Run ("hydrates docker runtime registry credential from docker details" , func (t * testing.T ) {
@@ -95,7 +95,7 @@ func TestCLIInputFromSource(t *testing.T) {
9595
9696 ServiceFromAPI (& input , source )
9797
98- require .Equal (t , "docker" , * input .Runtime )
98+ require .Equal (t , servicetypes . ServiceRuntime ( "docker" ) , * input .Runtime )
9999 require .Equal (t , "rgc-456" , * input .RegistryCredential )
100100 })
101101
@@ -119,12 +119,12 @@ func TestCLIInputFromSource(t *testing.T) {
119119
120120 ServiceFromAPI (& input , source )
121121
122- require .Equal (t , "background_worker" , * input .Type )
122+ require .Equal (t , servicetypes . ServiceType ( "background_worker" ) , * input .Type )
123123 require .Equal (t , "https://github.com/renderinc/worker" , * input .Repo )
124124 require .Equal (t , "main" , * input .Branch )
125125 require .Equal (t , "workers/processor" , * input .RootDirectory )
126126 require .Equal (t , "evm-456" , * input .EnvironmentID )
127- require .Equal (t , "python" , * input .Runtime )
127+ require .Equal (t , servicetypes . ServiceRuntime ( "python" ) , * input .Runtime )
128128 })
129129
130130 t .Run ("hydrates static site defaults" , func (t * testing.T ) {
@@ -147,7 +147,7 @@ func TestCLIInputFromSource(t *testing.T) {
147147
148148 ServiceFromAPI (& input , source )
149149
150- require .Equal (t , "static_site" , * input .Type )
150+ require .Equal (t , servicetypes . ServiceType ( "static_site" ) , * input .Type )
151151 require .Equal (t , "https://github.com/renderinc/docs" , * input .Repo )
152152 require .Equal (t , "main" , * input .Branch )
153153 require .Equal (t , "website" , * input .RootDirectory )
@@ -182,18 +182,18 @@ func TestCLIInputFromSource(t *testing.T) {
182182 input := servicetypes.Service {
183183 Name : "clone-explicit" ,
184184 From : pointers .From ("srv-source" ),
185- Type : pointers . From ("private_service" ),
185+ Type : svcTypeRaw ("private_service" ),
186186 Repo : pointers .From ("https://github.com/org/custom" ),
187187 Branch : pointers .From ("feature-x" ),
188- Runtime : pointers . From ( "docker" ),
188+ Runtime : svcRuntime ( servicetypes . ServiceRuntimeDocker ),
189189 }
190190
191191 ServiceFromAPI (& input , source )
192192
193- require .Equal (t , "private_service" , * input .Type )
193+ require .Equal (t , servicetypes . ServiceType ( "private_service" ) , * input .Type )
194194 require .Equal (t , "https://github.com/org/custom" , * input .Repo )
195195 require .Equal (t , "feature-x" , * input .Branch )
196- require .Equal (t , "docker" , * input .Runtime )
196+ require .Equal (t , servicetypes . ServiceRuntime ( "docker" ) , * input .Runtime )
197197 })
198198
199199 t .Run ("does not copy repo defaults when image is explicitly provided" , func (t * testing.T ) {
@@ -214,7 +214,7 @@ func TestCLIInputFromSource(t *testing.T) {
214214 require .Equal (t , "docker.io/custom/image:latest" , * input .Image )
215215 require .Nil (t , input .Repo )
216216 require .Nil (t , input .Branch )
217- require .Equal (t , "image" , * input .Runtime )
217+ require .Equal (t , servicetypes . ServiceRuntime ( "image" ) , * input .Runtime )
218218 })
219219
220220 t .Run ("does not copy image defaults when repo is explicitly provided" , func (t * testing.T ) {
0 commit comments