@@ -9,18 +9,12 @@ def _dummy_file(tmp_path):
99
1010@responses .activate
1111def test_integrations_github_add ():
12- responses .add (responses .POST , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configuration " , json = {}, status = 200 )
12+ responses .add (responses .POST , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations/app " , json = {}, status = 200 )
1313 cli (["integrations" , "github" , "add" , "-a" , "myAlias" , "-h" , "my.host.com" , "--api-key" , "123456" , "-i" ])
1414
15- @responses .activate
16- def test_integrations_github_add_multiple (tmp_path ):
17- f = _dummy_file (tmp_path )
18- responses .add (responses .POST , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations" , json = {}, status = 200 )
19- cli (["integrations" , "github" , "add-multiple" , "-f" , str (f )])
20-
2115@responses .activate
2216def test_integrations_github_delete ():
23- responses .add (responses .DELETE , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configuration /test" , status = 200 )
17+ responses .add (responses .DELETE , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations/app /test" , status = 200 )
2418 cli (["integrations" , "github" , "delete" , "-a" , "test" ])
2519
2620@responses .activate
@@ -30,7 +24,7 @@ def test_integrations_github_delete_all():
3024
3125@responses .activate
3226def test_integrations_github_get ():
33- responses .add (responses .GET , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configuration/test" , json = {}, status = 200 )
27+ responses .add (responses .GET , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configuration/app/ test" , json = {}, status = 200 )
3428 cli (["integrations" , "github" , "get" , "-a" , "test" ])
3529
3630@responses .activate
@@ -45,17 +39,17 @@ def test_integrations_github_get_default():
4539
4640@responses .activate
4741def test_integrations_github_update ():
48- responses .add (responses .PUT , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configuration /test" , json = {}, status = 200 )
42+ responses .add (responses .PUT , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations/app /test" , json = {}, status = 200 )
4943 cli (["integrations" , "github" , "update" , "-a" , "test" , "-i" ])
5044
5145@responses .activate
5246def test_integrations_github_validate ():
53- responses .add (responses .POST , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configuration /validate/test" , json = {}, status = 200 )
47+ responses .add (responses .POST , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations /validate/test" , json = {}, status = 200 )
5448 cli (["integrations" , "github" , "validate" , "-a" , "test" ])
5549
5650@responses .activate
5751def test_integrations_github_validate_all ():
58- responses .add (responses .POST , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configuration /validate" , json = {}, status = 200 )
52+ responses .add (responses .POST , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations /validate" , json = {}, status = 200 )
5953 cli (["integrations" , "github" , "validate-all" ])
6054
6155@responses .activate
@@ -68,6 +62,11 @@ def test_integrations_github_update_personal():
6862 responses .add (responses .PUT , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations/personal/test" , json = {}, status = 200 )
6963 cli (["integrations" , "github" , "update-personal" , "-a" , "test" , "-i" ])
7064
65+ @responses .activate
66+ def test_integrations_github_get_personal ():
67+ responses .add (responses .GET , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations/personal/test" , json = {}, status = 200 )
68+ cli (["integrations" , "github" , "get" , "-a" , "test" ])
69+
7170@responses .activate
7271def test_integrations_github_delete_personal ():
7372 responses .add (responses .DELETE , os .getenv ("CORTEX_BASE_URL" ) + "/api/v1/github/configurations/personal/test" , status = 200 )
0 commit comments