@@ -27,7 +27,8 @@ def test_valid_org_app_name():
2727 assert result .exit_code
2828
2929 # assert a good (and availablea name) works
30- real_app = "lightning/install-app"
30+ # This should be an app that's always in the gallery
31+ real_app = "lightning/invideo"
3132 result = runner .invoke (lightning_cli .install_app , [real_app ])
3233 assert "Press enter to continue:" in result .output
3334
@@ -145,7 +146,7 @@ def test_component_install(real_component, test_component_pip_name):
145146
146147def test_prompt_actions ():
147148 # TODO: each of these installs must check that a package is installed in the environment correctly
148- app_to_use = "lightning/install-app "
149+ app_to_use = "lightning/invideo "
149150
150151 runner = CliRunner ()
151152
@@ -197,43 +198,42 @@ def test_version_arg_component(tmpdir, monkeypatch):
197198def test_version_arg_app (tmpdir ):
198199
199200 # Version does not exist
200- app_name = "lightning/hackernews-app "
201+ app_name = "lightning/invideo "
201202 version_arg = "NOT-EXIST"
202203 runner = CliRunner ()
203204 result = runner .invoke (lightning_cli .install_app , [app_name , f"--version={ version_arg } " ])
204205 assert f"app: 'Version { version_arg } for { app_name } ' is not" in str (result .exception )
205206 assert result .exit_code == 1
206207
207208 # Version exists
208- version_arg = "0.0.1 "
209+ version_arg = "0.0.2 "
209210 runner = CliRunner ()
210211 result = runner .invoke (lightning_cli .install_app , [app_name , f"--version={ version_arg } " , "--yes" ])
211212 assert result .exit_code == 0
212213
213214
214215def test_proper_url_parsing ():
215216
216- name = "lightning/install-app "
217+ name = "lightning/invideo "
217218
218219 # make sure org/app-name name is correct
219220 org , app = cmd_install ._validate_name (name , resource_type = "app" , example = "lightning/lit-slack-component" )
220221 assert org == "lightning"
221- assert app == "install-app "
222+ assert app == "invideo "
222223
223224 # resolve registry (orgs can have a private registry through their environment variables)
224225 registry_url = cmd_install ._resolve_app_registry ()
225- assert registry_url == "https://api.sheety.co/e559626ba514c7ba80caae1e38a8d4f4/lightningAppRegistry /apps"
226+ assert registry_url == "https://lightning.ai/v1 /apps"
226227
227228 # load the component resource
228229 component_entry = cmd_install ._resolve_resource (registry_url , name = name , version_arg = "latest" , resource_type = "app" )
229230
230231 source_url , git_url , folder_name , git_sha = cmd_install ._show_install_app_prompt (
231232 component_entry , app , org , True , resource_type = "app"
232233 )
233- assert folder_name == "install-app "
234+ assert folder_name == "LAI-InVideo-search-App "
234235 # FixMe: this need to be updated after release with updated org rename
235- assert source_url == "https://github.com/PyTorchLightning/install-app"
236- assert git_url .find ("@" ) > 10 # TODO: this will be removed once the apps repos will be public
236+ assert source_url == "https://github.com/Lightning-AI/LAI-InVideo-search-App"
237237 assert "#ref" not in git_url
238238 assert git_sha
239239
@@ -286,20 +286,20 @@ def test_install_app_shows_error(tmpdir):
286286# os.chdir(cwd)
287287
288288
289- def test_public_app_registry ():
290- registry = cmd_install ._resolve_app_registry ()
291- assert registry == "https://api.sheety.co/e559626ba514c7ba80caae1e38a8d4f4/lightningAppRegistry/apps"
292-
293-
294289@mock .patch .dict (os .environ , {"LIGHTNING_APP_REGISTRY" : "https://TODO/other_non_PL_registry" })
295290def test_private_app_registry ():
296291 registry = cmd_install ._resolve_app_registry ()
297292 assert registry == "https://TODO/other_non_PL_registry"
298293
299294
295+ def test_public_app_registry ():
296+ registry = cmd_install ._resolve_app_registry ()
297+ assert registry == "https://lightning.ai/v1/apps"
298+
299+
300300def test_public_component_registry ():
301301 registry = cmd_install ._resolve_component_registry ()
302- assert registry == "https://api.sheety.co/e559626ba514c7ba80caae1e38a8d4f4/lightningAppRegistry /components"
302+ assert registry == "https://lightning.ai/v1 /components"
303303
304304
305305@mock .patch .dict (os .environ , {"LIGHTNING_COMPONENT_REGISTRY" : "https://TODO/other_non_PL_registry" })
0 commit comments