{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/68646858","id":68646858,"diff_hunk":"@@ -0,0 +1,270 @@\n+/**\n+ * Copyright (c) Codice Foundation\n+ * <p>\n+ * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser\n+ * General Public License as published by the Free Software Foundation, either version 3 of the\n+ * License, or any later version.\n+ * <p>\n+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\n+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details. A copy of the GNU Lesser General Public License\n+ * is distributed along with this program and can be found at\n+ * <http://www.gnu.org/licenses/lgpl.html>.\n+ */\n+package ddf.test.itests.catalog;\n+\n+import static com.jayway.restassured.RestAssured.when;\n+import static org.hamcrest.CoreMatchers.equalTo;\n+import static org.junit.Assert.fail;\n+\n+import java.io.ByteArrayInputStream;\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.io.OutputStream;\n+import java.io.StringWriter;\n+\n+import javax.xml.xpath.XPathExpressionException;\n+\n+import org.apache.commons.io.IOUtils;\n+import org.apache.commons.net.ftp.FTP;\n+import org.apache.commons.net.ftp.FTPClient;\n+import org.apache.commons.net.ftp.FTPReply;\n+import org.junit.After;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.ops4j.pax.exam.junit.PaxExam;\n+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;\n+import org.ops4j.pax.exam.spi.reactors.PerClass;\n+\n+import com.jayway.restassured.path.xml.XmlPath;\n+import com.jayway.restassured.response.Response;\n+\n+import ddf.common.test.AfterExam;\n+import ddf.common.test.BeforeExam;\n+import ddf.test.itests.AbstractIntegrationTest;\n+\n+/**\n+ * Integration Tests for the FTP/S Endpoint supporting ingest.\n+ */\n+@RunWith(PaxExam.class)\n+@ExamReactorStrategy(PerClass.class)\n+public class TestFtp extends AbstractIntegrationTest {\n+\n+    private static final String FTP_SERVER = \"localhost\";\n+\n+    private static final int FTP_DEFAULT_PORT = 8021;","path":"distribution/test/itests/test-itests-ddf/src/test/java/ddf/test/itests/catalog/TestFtp.java","position":56,"original_position":56,"commit_id":"ae1f64b053cbdacce914a32663db648225451bd2","original_commit_id":"319db61cb338ed59c1012baa486d66da3011ce46","user":{"login":"lcrosenbu","id":16792154,"avatar_url":"https://avatars.githubusercontent.com/u/16792154?v=3","gravatar_id":"","url":"https://api.github.com/users/lcrosenbu","html_url":"https://github.com/lcrosenbu","followers_url":"https://api.github.com/users/lcrosenbu/followers","following_url":"https://api.github.com/users/lcrosenbu/following{/other_user}","gists_url":"https://api.github.com/users/lcrosenbu/gists{/gist_id}","starred_url":"https://api.github.com/users/lcrosenbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcrosenbu/subscriptions","organizations_url":"https://api.github.com/users/lcrosenbu/orgs","repos_url":"https://api.github.com/users/lcrosenbu/repos","events_url":"https://api.github.com/users/lcrosenbu/events{/privacy}","received_events_url":"https://api.github.com/users/lcrosenbu/received_events","type":"User","site_admin":false},"body":"The FTP endpoint does not support this. See ticket https://codice.atlassian.net/browse/DDF-2249","created_at":"2016-06-27T20:12:05Z","updated_at":"2016-06-27T20:12:05Z","html_url":"https://github.com/codice/ddf/pull/884#discussion_r68646858","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/884","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/68646858"},"html":{"href":"https://github.com/codice/ddf/pull/884#discussion_r68646858"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/884"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/884","id":74657708,"html_url":"https://github.com/codice/ddf/pull/884","diff_url":"https://github.com/codice/ddf/pull/884.diff","patch_url":"https://github.com/codice/ddf/pull/884.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/884","number":884,"state":"open","locked":false,"title":"DDF-2191 Created integration tests covering ingest through the FTP endpoint","user":{"login":"lcrosenbu","id":16792154,"avatar_url":"https://avatars.githubusercontent.com/u/16792154?v=3","gravatar_id":"","url":"https://api.github.com/users/lcrosenbu","html_url":"https://github.com/lcrosenbu","followers_url":"https://api.github.com/users/lcrosenbu/followers","following_url":"https://api.github.com/users/lcrosenbu/following{/other_user}","gists_url":"https://api.github.com/users/lcrosenbu/gists{/gist_id}","starred_url":"https://api.github.com/users/lcrosenbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcrosenbu/subscriptions","organizations_url":"https://api.github.com/users/lcrosenbu/orgs","repos_url":"https://api.github.com/users/lcrosenbu/repos","events_url":"https://api.github.com/users/lcrosenbu/events{/privacy}","received_events_url":"https://api.github.com/users/lcrosenbu/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nCreated new integration tests for coverage of the FTP endpoint for ingest capability. \r\n\r\nTest suite includes following test cases:\r\n - verify successful connection to FTP server\r\n - verify successful PUT of file to FTP server (storeFile)\r\n - verify successful PUT of file to FTP server using streaming method (storeFileStream)\r\n \r\nNew dependency on Apache Commons Net for FTP/S client APIs.\r\n\r\n#### Who is reviewing it (please choose AT LEAST two reviewers that need to approve the PR before it can get merged; if a component team is listed, at least one of its members needs to approve)?\r\n@peterhuffer @emmberk @mweser @troymohl \r\n\r\n#### Choose 2 committers to review/merge the PR (please choose ONLY two committers from below, delete the rest).\r\n@jaymcnallie\r\n@kcwire\r\n\r\n#### How should this be tested?\r\nRun the new \"TestFtp\" automated itest suite:\r\n  1) cd ddf/distribution/test/itests/test-itests-ddf\r\n  2) mvn test -Dtest=TestFtp\r\n\r\n#### Any background context you want to provide?\r\nThese tests were intended to provide integration test coverage of the new insecure FTP endpoint capability for ingest, implemented under DDF-2048.\r\n\r\n#### What are the relevant tickets?\r\nhttps://codice.atlassian.net/browse/DDF-2048\r\nAs an integrator, I would like an FTP endpoint, so that I can ingest data via an FTP service.\r\n\r\nhttps://codice.atlassian.net/browse/DDF-2191\r\nCreate Integration Tests covering Ingest through the FTP Endpoint\r\n\r\n#### Screenshots (if appropriate)\r\nN/A\r\n\r\n#### Checklist:\r\n- [ ] Documentation Updated\r\n- [ ] Update / Add Unit Tests\r\n- [X] Update / Add Integration Tests\r\n","created_at":"2016-06-21T18:00:02Z","updated_at":"2016-06-27T20:12:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b801f27eda66cee7874e2a23ec69ec87eeabfb5","assignee":{"login":"jaymcnallie","id":4419383,"avatar_url":"https://avatars.githubusercontent.com/u/4419383?v=3","gravatar_id":"","url":"https://api.github.com/users/jaymcnallie","html_url":"https://github.com/jaymcnallie","followers_url":"https://api.github.com/users/jaymcnallie/followers","following_url":"https://api.github.com/users/jaymcnallie/following{/other_user}","gists_url":"https://api.github.com/users/jaymcnallie/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymcnallie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymcnallie/subscriptions","organizations_url":"https://api.github.com/users/jaymcnallie/orgs","repos_url":"https://api.github.com/users/jaymcnallie/repos","events_url":"https://api.github.com/users/jaymcnallie/events{/privacy}","received_events_url":"https://api.github.com/users/jaymcnallie/received_events","type":"User","site_admin":false},"assignees":[{"login":"jaymcnallie","id":4419383,"avatar_url":"https://avatars.githubusercontent.com/u/4419383?v=3","gravatar_id":"","url":"https://api.github.com/users/jaymcnallie","html_url":"https://github.com/jaymcnallie","followers_url":"https://api.github.com/users/jaymcnallie/followers","following_url":"https://api.github.com/users/jaymcnallie/following{/other_user}","gists_url":"https://api.github.com/users/jaymcnallie/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymcnallie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymcnallie/subscriptions","organizations_url":"https://api.github.com/users/jaymcnallie/orgs","repos_url":"https://api.github.com/users/jaymcnallie/repos","events_url":"https://api.github.com/users/jaymcnallie/events{/privacy}","received_events_url":"https://api.github.com/users/jaymcnallie/received_events","type":"User","site_admin":false},{"login":"kcwire","id":4631300,"avatar_url":"https://avatars.githubusercontent.com/u/4631300?v=3","gravatar_id":"","url":"https://api.github.com/users/kcwire","html_url":"https://github.com/kcwire","followers_url":"https://api.github.com/users/kcwire/followers","following_url":"https://api.github.com/users/kcwire/following{/other_user}","gists_url":"https://api.github.com/users/kcwire/gists{/gist_id}","starred_url":"https://api.github.com/users/kcwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcwire/subscriptions","organizations_url":"https://api.github.com/users/kcwire/orgs","repos_url":"https://api.github.com/users/kcwire/repos","events_url":"https://api.github.com/users/kcwire/events{/privacy}","received_events_url":"https://api.github.com/users/kcwire/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/884/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/884/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/884/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/ae1f64b053cbdacce914a32663db648225451bd2","head":{"label":"lcrosenbu:DDF-2191","ref":"DDF-2191","sha":"ae1f64b053cbdacce914a32663db648225451bd2","user":{"login":"lcrosenbu","id":16792154,"avatar_url":"https://avatars.githubusercontent.com/u/16792154?v=3","gravatar_id":"","url":"https://api.github.com/users/lcrosenbu","html_url":"https://github.com/lcrosenbu","followers_url":"https://api.github.com/users/lcrosenbu/followers","following_url":"https://api.github.com/users/lcrosenbu/following{/other_user}","gists_url":"https://api.github.com/users/lcrosenbu/gists{/gist_id}","starred_url":"https://api.github.com/users/lcrosenbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcrosenbu/subscriptions","organizations_url":"https://api.github.com/users/lcrosenbu/orgs","repos_url":"https://api.github.com/users/lcrosenbu/repos","events_url":"https://api.github.com/users/lcrosenbu/events{/privacy}","received_events_url":"https://api.github.com/users/lcrosenbu/received_events","type":"User","site_admin":false},"repo":{"id":59596392,"name":"ddf","full_name":"lcrosenbu/ddf","owner":{"login":"lcrosenbu","id":16792154,"avatar_url":"https://avatars.githubusercontent.com/u/16792154?v=3","gravatar_id":"","url":"https://api.github.com/users/lcrosenbu","html_url":"https://github.com/lcrosenbu","followers_url":"https://api.github.com/users/lcrosenbu/followers","following_url":"https://api.github.com/users/lcrosenbu/following{/other_user}","gists_url":"https://api.github.com/users/lcrosenbu/gists{/gist_id}","starred_url":"https://api.github.com/users/lcrosenbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcrosenbu/subscriptions","organizations_url":"https://api.github.com/users/lcrosenbu/orgs","repos_url":"https://api.github.com/users/lcrosenbu/repos","events_url":"https://api.github.com/users/lcrosenbu/events{/privacy}","received_events_url":"https://api.github.com/users/lcrosenbu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lcrosenbu/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":true,"url":"https://api.github.com/repos/lcrosenbu/ddf","forks_url":"https://api.github.com/repos/lcrosenbu/ddf/forks","keys_url":"https://api.github.com/repos/lcrosenbu/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lcrosenbu/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lcrosenbu/ddf/teams","hooks_url":"https://api.github.com/repos/lcrosenbu/ddf/hooks","issue_events_url":"https://api.github.com/repos/lcrosenbu/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/lcrosenbu/ddf/events","assignees_url":"https://api.github.com/repos/lcrosenbu/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/lcrosenbu/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/lcrosenbu/ddf/tags","blobs_url":"https://api.github.com/repos/lcrosenbu/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lcrosenbu/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lcrosenbu/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/lcrosenbu/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lcrosenbu/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/lcrosenbu/ddf/languages","stargazers_url":"https://api.github.com/repos/lcrosenbu/ddf/stargazers","contributors_url":"https://api.github.com/repos/lcrosenbu/ddf/contributors","subscribers_url":"https://api.github.com/repos/lcrosenbu/ddf/subscribers","subscription_url":"https://api.github.com/repos/lcrosenbu/ddf/subscription","commits_url":"https://api.github.com/repos/lcrosenbu/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/lcrosenbu/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/lcrosenbu/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/lcrosenbu/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/lcrosenbu/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/lcrosenbu/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lcrosenbu/ddf/merges","archive_url":"https://api.github.com/repos/lcrosenbu/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lcrosenbu/ddf/downloads","issues_url":"https://api.github.com/repos/lcrosenbu/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/lcrosenbu/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/lcrosenbu/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/lcrosenbu/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lcrosenbu/ddf/labels{/name}","releases_url":"https://api.github.com/repos/lcrosenbu/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/lcrosenbu/ddf/deployments","created_at":"2016-05-24T18:01:35Z","updated_at":"2016-06-14T21:40:14Z","pushed_at":"2016-06-27T19:46:33Z","git_url":"git://github.com/lcrosenbu/ddf.git","ssh_url":"git@github.com:lcrosenbu/ddf.git","clone_url":"https://github.com/lcrosenbu/ddf.git","svn_url":"https://github.com/lcrosenbu/ddf","homepage":"http://ddf.codice.org","size":143059,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"codice:master","ref":"master","sha":"3478bf2dcbfc4104329ac8cc4999e2bf152c7451","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":15173563,"name":"ddf","full_name":"codice/ddf","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":false,"url":"https://api.github.com/repos/codice/ddf","forks_url":"https://api.github.com/repos/codice/ddf/forks","keys_url":"https://api.github.com/repos/codice/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/ddf/teams","hooks_url":"https://api.github.com/repos/codice/ddf/hooks","issue_events_url":"https://api.github.com/repos/codice/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/codice/ddf/events","assignees_url":"https://api.github.com/repos/codice/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/codice/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/codice/ddf/tags","blobs_url":"https://api.github.com/repos/codice/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/ddf/languages","stargazers_url":"https://api.github.com/repos/codice/ddf/stargazers","contributors_url":"https://api.github.com/repos/codice/ddf/contributors","subscribers_url":"https://api.github.com/repos/codice/ddf/subscribers","subscription_url":"https://api.github.com/repos/codice/ddf/subscription","commits_url":"https://api.github.com/repos/codice/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/codice/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/ddf/merges","archive_url":"https://api.github.com/repos/codice/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/ddf/downloads","issues_url":"https://api.github.com/repos/codice/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/codice/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/ddf/labels{/name}","releases_url":"https://api.github.com/repos/codice/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/codice/ddf/deployments","created_at":"2013-12-13T20:38:28Z","updated_at":"2016-06-14T21:40:37Z","pushed_at":"2016-06-27T20:01:41Z","git_url":"git://github.com/codice/ddf.git","ssh_url":"git@github.com:codice/ddf.git","clone_url":"https://github.com/codice/ddf.git","svn_url":"https://github.com/codice/ddf","homepage":"http://ddf.codice.org","size":272294,"stargazers_count":39,"watchers_count":39,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":81,"mirror_url":null,"open_issues_count":21,"forks":81,"open_issues":21,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/884"},"html":{"href":"https://github.com/codice/ddf/pull/884"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/884"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/884/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/884/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/884/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/ae1f64b053cbdacce914a32663db648225451bd2"}}}}
{"actor":{"display_login":"lcrosenbu"}}