@@ -118,7 +118,7 @@ def test_returns_the_latest_available(self, ec2_client_mock: Mock):
118118 }
119119 image_id , username = get_image_id_and_username (
120120 ec2_client_mock ,
121- cuda = False ,
121+ gpu_name = None ,
122122 instance_type = "some" ,
123123 )
124124 assert image_id == "ami-00000000000000003"
@@ -144,7 +144,7 @@ def test_raises_resource_not_found_if_none_available(
144144 with pytest .raises (ComputeResourceNotFoundError ):
145145 get_image_id_and_username (
146146 ec2_client_mock ,
147- cuda = False ,
147+ gpu_name = None ,
148148 instance_type = "some" ,
149149 )
150150 assert "image 'dstack-0.0' not found" in caplog .text
@@ -162,7 +162,7 @@ def test_uses_dstack_image_name_and_account_id_if_image_config_not_provided(
162162 monkeypatch .setattr ("dstack.version.base_image" , "0.0" )
163163 _ , username = get_image_id_and_username (
164164 ec2_client_mock ,
165- cuda = cuda ,
165+ gpu_name = "A10G" if cuda else None ,
166166 instance_type = "some" ,
167167 )
168168 assert username == "ubuntu"
@@ -198,7 +198,7 @@ def test_uses_image_config_if_provided(
198198 )
199199 _ , username = get_image_id_and_username (
200200 ec2_client_mock ,
201- cuda = cuda ,
201+ gpu_name = "A10G" if cuda else None ,
202202 instance_type = "some" ,
203203 image_config = image_config ,
204204 )
@@ -221,7 +221,7 @@ def test_raises_resource_not_found_if_image_config_property_not_set(
221221 with pytest .raises (ComputeResourceNotFoundError ):
222222 get_image_id_and_username (
223223 ec2_client_mock ,
224- cuda = False ,
224+ gpu_name = None ,
225225 instance_type = "some" ,
226226 image_config = image_config ,
227227 )
0 commit comments