{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-app-manager/pulls/comments/46028439","id":46028439,"diff_hunk":"@@ -0,0 +1,91 @@\n+/*\n+*Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+*\n+*WSO2 Inc. licenses this file to you under the Apache License,\n+*Version 2.0 (the \"License\"); you may not use this file except\n+*in compliance with the License.\n+*You may obtain a copy of the License at\n+*\n+*http://www.apache.org/licenses/LICENSE-2.0\n+*\n+*Unless required by applicable law or agreed to in writing,\n+*software distributed under the License is distributed on an\n+*\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+*KIND, either express or implied.  See the License for the\n+*specific language governing permissions and limitations\n+*under the License.\n+*/\n+\n+package org.wso2.appmanager.integration.test.cases;\n+\n+import org.json.JSONObject;\n+import org.testng.annotations.AfterClass;\n+import org.testng.annotations.BeforeClass;\n+import org.testng.annotations.Test;\n+import org.wso2.appmanager.integration.utils.APPMPublisherRestClient;\n+import org.wso2.appmanager.integration.utils.AppmTestConstants;\n+import org.wso2.carbon.automation.engine.context.AutomationContext;\n+import org.wso2.carbon.automation.engine.context.TestUserMode;\n+import org.wso2.carbon.automation.engine.context.beans.User;\n+import org.wso2.carbon.automation.test.utils.http.client.HttpResponse;\n+\n+import static org.testng.Assert.assertEquals;\n+import static org.testng.Assert.assertTrue;\n+\n+public class WebAppPublishTestCase {\n+\n+    private static final String TEST_DESCRIPTION = \"Verify Publishing a Web App\";\n+    private APPMPublisherRestClient appmPublisherRestClient;\n+    private String appName = \"WebAppPublishTestCase\";\n+    private String context = \"/WebAppPublishTestCase\";\n+    private String trackingCode = \"AM_WebAppPublishTestCase\";\n+    private String version = \"1.0.0\";\n+    private String backEndUrl;\n+    private User adminUser;\n+\n+\n+    @BeforeClass(alwaysRun = true)\n+    public void startUp() throws Exception {\n+        AutomationContext appMServer = new AutomationContext(AppmTestConstants.APP_MANAGER,\n+                                                             TestUserMode.SUPER_TENANT_ADMIN);\n+        backEndUrl = appMServer.getContextUrls().getWebAppURLHttps();\n+        appmPublisherRestClient = new APPMPublisherRestClient(backEndUrl);\n+        adminUser = appMServer.getSuperTenant().getTenantAdmin();\n+        appmPublisherRestClient.login(adminUser.getUserName(), adminUser.getPassword());\n+\n+    }\n+\n+    @Test(description = TEST_DESCRIPTION)\n+    public void testPublisherCreateWebApp() throws Exception {\n+        HttpResponse response = appmPublisherRestClient.webAppCreate(appName, context, version,\n+                                                                     trackingCode);\n+\n+        JSONObject responseData = new JSONObject(response.getData());\n+        String uuid = responseData.getString(AppmTestConstants.ID);\n+\n+        HttpResponse submitHttpResponse = appmPublisherRestClient.changeState(uuid,\n+                                                                              \"Submit for Review\");","path":"modules/integration/tests/src/test/java/org/wso2/appmanager/integration/test/cases/WebAppPublishTestCase.java","position":67,"original_position":67,"commit_id":"497a7847223d4710bb085f633ee675c4627d4e0a","original_commit_id":"497a7847223d4710bb085f633ee675c4627d4e0a","user":{"login":"sajithab","id":11046571,"avatar_url":"https://avatars.githubusercontent.com/u/11046571?v=3","gravatar_id":"","url":"https://api.github.com/users/sajithab","html_url":"https://github.com/sajithab","followers_url":"https://api.github.com/users/sajithab/followers","following_url":"https://api.github.com/users/sajithab/following{/other_user}","gists_url":"https://api.github.com/users/sajithab/gists{/gist_id}","starred_url":"https://api.github.com/users/sajithab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajithab/subscriptions","organizations_url":"https://api.github.com/users/sajithab/orgs","repos_url":"https://api.github.com/users/sajithab/repos","events_url":"https://api.github.com/users/sajithab/events{/privacy}","received_events_url":"https://api.github.com/users/sajithab/received_events","type":"User","site_admin":false},"body":"Use contact ","created_at":"2015-11-27T09:12:46Z","updated_at":"2015-11-27T09:12:46Z","html_url":"https://github.com/wso2/product-app-manager/pull/265#discussion_r46028439","pull_request_url":"https://api.github.com/repos/wso2/product-app-manager/pulls/265","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-app-manager/pulls/comments/46028439"},"html":{"href":"https://github.com/wso2/product-app-manager/pull/265#discussion_r46028439"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-app-manager/pulls/265"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-app-manager/pulls/265","id":51501825,"html_url":"https://github.com/wso2/product-app-manager/pull/265","diff_url":"https://github.com/wso2/product-app-manager/pull/265.diff","patch_url":"https://github.com/wso2/product-app-manager/pull/265.patch","issue_url":"https://api.github.com/repos/wso2/product-app-manager/issues/265","number":265,"state":"open","locked":false,"title":"Fix for APPM-1101- Api testcases","user":{"login":"lakshani","id":11018512,"avatar_url":"https://avatars.githubusercontent.com/u/11018512?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshani","html_url":"https://github.com/lakshani","followers_url":"https://api.github.com/users/lakshani/followers","following_url":"https://api.github.com/users/lakshani/following{/other_user}","gists_url":"https://api.github.com/users/lakshani/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshani/subscriptions","organizations_url":"https://api.github.com/users/lakshani/orgs","repos_url":"https://api.github.com/users/lakshani/repos","events_url":"https://api.github.com/users/lakshani/events{/privacy}","received_events_url":"https://api.github.com/users/lakshani/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-23T09:38:18Z","updated_at":"2015-11-27T09:12:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"765b6594d2b3a67524205eb74a41ac092bf4e8d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-app-manager/pulls/265/commits","review_comments_url":"https://api.github.com/repos/wso2/product-app-manager/pulls/265/comments","review_comment_url":"https://api.github.com/repos/wso2/product-app-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-app-manager/issues/265/comments","statuses_url":"https://api.github.com/repos/wso2/product-app-manager/statuses/497a7847223d4710bb085f633ee675c4627d4e0a","head":{"label":"lakshani:api_testcases","ref":"api_testcases","sha":"497a7847223d4710bb085f633ee675c4627d4e0a","user":{"login":"lakshani","id":11018512,"avatar_url":"https://avatars.githubusercontent.com/u/11018512?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshani","html_url":"https://github.com/lakshani","followers_url":"https://api.github.com/users/lakshani/followers","following_url":"https://api.github.com/users/lakshani/following{/other_user}","gists_url":"https://api.github.com/users/lakshani/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshani/subscriptions","organizations_url":"https://api.github.com/users/lakshani/orgs","repos_url":"https://api.github.com/users/lakshani/repos","events_url":"https://api.github.com/users/lakshani/events{/privacy}","received_events_url":"https://api.github.com/users/lakshani/received_events","type":"User","site_admin":false},"repo":{"id":42849532,"name":"product-app-manager","full_name":"lakshani/product-app-manager","owner":{"login":"lakshani","id":11018512,"avatar_url":"https://avatars.githubusercontent.com/u/11018512?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshani","html_url":"https://github.com/lakshani","followers_url":"https://api.github.com/users/lakshani/followers","following_url":"https://api.github.com/users/lakshani/following{/other_user}","gists_url":"https://api.github.com/users/lakshani/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshani/subscriptions","organizations_url":"https://api.github.com/users/lakshani/orgs","repos_url":"https://api.github.com/users/lakshani/repos","events_url":"https://api.github.com/users/lakshani/events{/privacy}","received_events_url":"https://api.github.com/users/lakshani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lakshani/product-app-manager","description":"App Manager store and publisher","fork":true,"url":"https://api.github.com/repos/lakshani/product-app-manager","forks_url":"https://api.github.com/repos/lakshani/product-app-manager/forks","keys_url":"https://api.github.com/repos/lakshani/product-app-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lakshani/product-app-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lakshani/product-app-manager/teams","hooks_url":"https://api.github.com/repos/lakshani/product-app-manager/hooks","issue_events_url":"https://api.github.com/repos/lakshani/product-app-manager/issues/events{/number}","events_url":"https://api.github.com/repos/lakshani/product-app-manager/events","assignees_url":"https://api.github.com/repos/lakshani/product-app-manager/assignees{/user}","branches_url":"https://api.github.com/repos/lakshani/product-app-manager/branches{/branch}","tags_url":"https://api.github.com/repos/lakshani/product-app-manager/tags","blobs_url":"https://api.github.com/repos/lakshani/product-app-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lakshani/product-app-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lakshani/product-app-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/lakshani/product-app-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lakshani/product-app-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/lakshani/product-app-manager/languages","stargazers_url":"https://api.github.com/repos/lakshani/product-app-manager/stargazers","contributors_url":"https://api.github.com/repos/lakshani/product-app-manager/contributors","subscribers_url":"https://api.github.com/repos/lakshani/product-app-manager/subscribers","subscription_url":"https://api.github.com/repos/lakshani/product-app-manager/subscription","commits_url":"https://api.github.com/repos/lakshani/product-app-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/lakshani/product-app-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/lakshani/product-app-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/lakshani/product-app-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/lakshani/product-app-manager/contents/{+path}","compare_url":"https://api.github.com/repos/lakshani/product-app-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lakshani/product-app-manager/merges","archive_url":"https://api.github.com/repos/lakshani/product-app-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lakshani/product-app-manager/downloads","issues_url":"https://api.github.com/repos/lakshani/product-app-manager/issues{/number}","pulls_url":"https://api.github.com/repos/lakshani/product-app-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/lakshani/product-app-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/lakshani/product-app-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lakshani/product-app-manager/labels{/name}","releases_url":"https://api.github.com/repos/lakshani/product-app-manager/releases{/id}","created_at":"2015-09-21T07:04:02Z","updated_at":"2015-09-21T07:04:06Z","pushed_at":"2015-11-27T05:24:14Z","git_url":"git://github.com/lakshani/product-app-manager.git","ssh_url":"git@github.com:lakshani/product-app-manager.git","clone_url":"https://github.com/lakshani/product-app-manager.git","svn_url":"https://github.com/lakshani/product-app-manager","homepage":null,"size":180651,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"1ee80b62237c10363cdc424889c085b10d314dba","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":16755765,"name":"product-app-manager","full_name":"wso2/product-app-manager","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/product-app-manager","description":"App Manager store and publisher","fork":false,"url":"https://api.github.com/repos/wso2/product-app-manager","forks_url":"https://api.github.com/repos/wso2/product-app-manager/forks","keys_url":"https://api.github.com/repos/wso2/product-app-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-app-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-app-manager/teams","hooks_url":"https://api.github.com/repos/wso2/product-app-manager/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-app-manager/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-app-manager/events","assignees_url":"https://api.github.com/repos/wso2/product-app-manager/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-app-manager/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-app-manager/tags","blobs_url":"https://api.github.com/repos/wso2/product-app-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-app-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-app-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-app-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-app-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-app-manager/languages","stargazers_url":"https://api.github.com/repos/wso2/product-app-manager/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-app-manager/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-app-manager/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-app-manager/subscription","commits_url":"https://api.github.com/repos/wso2/product-app-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-app-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-app-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-app-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-app-manager/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-app-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-app-manager/merges","archive_url":"https://api.github.com/repos/wso2/product-app-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-app-manager/downloads","issues_url":"https://api.github.com/repos/wso2/product-app-manager/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-app-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-app-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-app-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-app-manager/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-app-manager/releases{/id}","created_at":"2014-02-12T04:19:27Z","updated_at":"2015-10-22T11:51:50Z","pushed_at":"2015-11-27T05:24:14Z","git_url":"git://github.com/wso2/product-app-manager.git","ssh_url":"git@github.com:wso2/product-app-manager.git","clone_url":"https://github.com/wso2/product-app-manager.git","svn_url":"https://github.com/wso2/product-app-manager","homepage":null,"size":182012,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":3,"forks":35,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-app-manager/pulls/265"},"html":{"href":"https://github.com/wso2/product-app-manager/pull/265"},"issue":{"href":"https://api.github.com/repos/wso2/product-app-manager/issues/265"},"comments":{"href":"https://api.github.com/repos/wso2/product-app-manager/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-app-manager/pulls/265/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-app-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-app-manager/pulls/265/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-app-manager/statuses/497a7847223d4710bb085f633ee675c4627d4e0a"}}}}