{"action":"created","comment":{"url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/comments/68083593","id":68083593,"diff_hunk":"@@ -0,0 +1,83 @@\n+// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System.Collections.Generic;\n+using System.Threading.Tasks;\n+using NuGet.CommandLine.XPlat;\n+using NuGet.Test.Utility;\n+using Xunit;\n+\n+namespace NuGet.XPlat.FuncTest\n+{\n+    public class XPlatPushTests\n+    {\n+        [Theory]\n+        [InlineData(TestServers.MyGet, nameof(TestServers.MyGet), false)]\n+        [InlineData(TestServers.ProGet, nameof(TestServers.ProGet), false)]\n+        [InlineData(TestServers.Nexus, nameof(TestServers.Nexus), true)]\n+        // [InlineData(TestServers.Artifactory, nameof(TestServers.Artifactory), false)] // Trial license expired!\n+        // [InlineData(TestServers.Klondike, nameof(TestServers.Klondike), false)] // 500 Internal Server Error pushing\n+        // [InlineData(TestServers.NuGetServer, nameof(TestServers.NuGetServer), false)] // doesn't work (credentials?)\n+        public async Task PushToServerSucceeds(string sourceUri, string feedName, bool mustDeleteFirst)\n+        {\n+            // Arrange\n+            using (var packageDir = TestFileSystemUtility.CreateRandomTestFolder())\n+            {\n+                var packageId = \"XPlatPushTests.PushToServerSucceeds\";\n+                var packageVersion = \"1.0.0\";\n+                var packageFile = await TestPackages.GetRuntimePackageAsync(packageDir, packageId, packageVersion);\n+                var configFile = XPlatTestUtils.CopyFuncTestConfig(packageDir);\n+                var log = new TestCommandOutputLogger();\n+\n+                var apiKey = XPlatTestUtils.ReadApiKey(feedName);\n+                Assert.False(string.IsNullOrEmpty(apiKey));\n+\n+                if (mustDeleteFirst)\n+                {\n+                    DeletePackageBeforePush(packageId, packageVersion, sourceUri, apiKey);\n+                }\n+\n+                var pushArgs = new List<string>()\n+                {\n+                    \"push\",\n+                    packageFile.FullName,\n+                    \"--source\",\n+                    sourceUri,\n+                    \"--api-key\",\n+                    apiKey\n+                };\n+\n+                // Act\n+                int exitCode = Program.MainInternal(pushArgs.ToArray(), log);\n+\n+                // Assert\n+                Assert.Equal(string.Empty, log.ShowErrors());\n+                Assert.Equal(0, exitCode);\n+                Assert.Contains($@\"PUT {sourceUri}\", log.ShowMessages());","path":"test/NuGet.Core.FuncTests/NuGet.XPlat.FuncTest/XPlatPushTests.cs","position":56,"original_position":56,"commit_id":"69bca76bce512b424c63bb240cd5321c64826c71","original_commit_id":"69bca76bce512b424c63bb240cd5321c64826c71","user":{"login":"alpaix","id":8239356,"avatar_url":"https://avatars.githubusercontent.com/u/8239356?v=3","gravatar_id":"","url":"https://api.github.com/users/alpaix","html_url":"https://github.com/alpaix","followers_url":"https://api.github.com/users/alpaix/followers","following_url":"https://api.github.com/users/alpaix/following{/other_user}","gists_url":"https://api.github.com/users/alpaix/gists{/gist_id}","starred_url":"https://api.github.com/users/alpaix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alpaix/subscriptions","organizations_url":"https://api.github.com/users/alpaix/orgs","repos_url":"https://api.github.com/users/alpaix/repos","events_url":"https://api.github.com/users/alpaix/events{/privacy}","received_events_url":"https://api.github.com/users/alpaix/received_events","type":"User","site_admin":false},"body":"nit. `@` not needed?","created_at":"2016-06-22T16:09:40Z","updated_at":"2016-06-22T16:09:40Z","html_url":"https://github.com/NuGet/NuGet.Client/pull/706#discussion_r68083593","pull_request_url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706","_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/comments/68083593"},"html":{"href":"https://github.com/NuGet/NuGet.Client/pull/706#discussion_r68083593"},"pull_request":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706"}}},"pull_request":{"url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706","id":74704060,"html_url":"https://github.com/NuGet/NuGet.Client/pull/706","diff_url":"https://github.com/NuGet/NuGet.Client/pull/706.diff","patch_url":"https://github.com/NuGet/NuGet.Client/pull/706.patch","issue_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues/706","number":706,"state":"open","locked":false,"title":"Add basic push tests in NuGet.XPlat.FuncTest","user":{"login":"spadapet","id":2523431,"avatar_url":"https://avatars.githubusercontent.com/u/2523431?v=3","gravatar_id":"","url":"https://api.github.com/users/spadapet","html_url":"https://github.com/spadapet","followers_url":"https://api.github.com/users/spadapet/followers","following_url":"https://api.github.com/users/spadapet/following{/other_user}","gists_url":"https://api.github.com/users/spadapet/gists{/gist_id}","starred_url":"https://api.github.com/users/spadapet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spadapet/subscriptions","organizations_url":"https://api.github.com/users/spadapet/orgs","repos_url":"https://api.github.com/users/spadapet/repos","events_url":"https://api.github.com/users/spadapet/events{/privacy}","received_events_url":"https://api.github.com/users/spadapet/received_events","type":"User","site_admin":false},"body":"This adds an xplat functional test for pushing to a few of our internal test servers.\r\nThe API keys for those servers were added to config files that are already updated on each CI agent.\r\n\r\n@alpaix @zhili1208 @emgarten ","created_at":"2016-06-21T23:44:38Z","updated_at":"2016-06-22T16:09:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b30ada9c1a7ad5a81dd570e8cb631160223f61d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706/commits","review_comments_url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706/comments","review_comment_url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues/706/comments","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Client/statuses/69bca76bce512b424c63bb240cd5321c64826c71","head":{"label":"NuGet:spadapet/PushTest","ref":"spadapet/PushTest","sha":"69bca76bce512b424c63bb240cd5321c64826c71","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":19330736,"name":"NuGet.Client","full_name":"NuGet/NuGet.Client","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Client","description":"Core client libraries for NuGet Services","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Client","forks_url":"https://api.github.com/repos/NuGet/NuGet.Client/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Client/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Client/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Client/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Client/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Client/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Client/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Client/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Client/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Client/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Client/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Client/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Client/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Client/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Client/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues/comments{/number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Client/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Client/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Client/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Client/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Client/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Client/releases{/id}","deployments_url":"https://api.github.com/repos/NuGet/NuGet.Client/deployments","created_at":"2014-04-30T23:46:11Z","updated_at":"2016-06-18T15:20:14Z","pushed_at":"2016-06-22T14:09:53Z","git_url":"git://github.com/NuGet/NuGet.Client.git","ssh_url":"git@github.com:NuGet/NuGet.Client.git","clone_url":"https://github.com/NuGet/NuGet.Client.git","svn_url":"https://github.com/NuGet/NuGet.Client","homepage":null,"size":25894,"stargazers_count":72,"watchers_count":72,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":20,"forks":104,"open_issues":20,"watchers":72,"default_branch":"dev"}},"base":{"label":"NuGet:dev","ref":"dev","sha":"4d5c9a5feb4e6903474a9a737aa61ceab9248b89","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":19330736,"name":"NuGet.Client","full_name":"NuGet/NuGet.Client","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Client","description":"Core client libraries for NuGet Services","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Client","forks_url":"https://api.github.com/repos/NuGet/NuGet.Client/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Client/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Client/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Client/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Client/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Client/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Client/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Client/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Client/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Client/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Client/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Client/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Client/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Client/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Client/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Client/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues/comments{/number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Client/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Client/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Client/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Client/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Client/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Client/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Client/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Client/releases{/id}","deployments_url":"https://api.github.com/repos/NuGet/NuGet.Client/deployments","created_at":"2014-04-30T23:46:11Z","updated_at":"2016-06-18T15:20:14Z","pushed_at":"2016-06-22T14:09:53Z","git_url":"git://github.com/NuGet/NuGet.Client.git","ssh_url":"git@github.com:NuGet/NuGet.Client.git","clone_url":"https://github.com/NuGet/NuGet.Client.git","svn_url":"https://github.com/NuGet/NuGet.Client","homepage":null,"size":25894,"stargazers_count":72,"watchers_count":72,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":20,"forks":104,"open_issues":20,"watchers":72,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706"},"html":{"href":"https://github.com/NuGet/NuGet.Client/pull/706"},"issue":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/issues/706"},"comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/issues/706/comments"},"review_comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706/comments"},"review_comment":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/pulls/706/commits"},"statuses":{"href":"https://api.github.com/repos/NuGet/NuGet.Client/statuses/69bca76bce512b424c63bb240cd5321c64826c71"}}}}
{"actor":{"display_login":"alpaix"}}