{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/comments/23881536","id":23881536,"diff_hunk":"@@ -57,3 +61,36 @@\n                      (:body response)))\n               (is (re-matches #\"text/plain; charset=.*\"\n                               (get-in response [:headers \"content-type\"]))))))))))\n+\n+(deftest ^:integration test-HTTP-404\n+  (testing \"When an improperly-formatted request is made (i.e., in the pre-Puppet 4 format),\n+            a 404 error is logged containing information on upgrading the agent.\"\n+    (bootstrap/with-puppetserver-running\n+      app\n+      {:certificate-authority {:certificate-status {:authorization-required false}}}\n+      (with-test-logging\n+        (let [jruby-service (tk-app/get-service app :JRubyPuppetService)\n+              puppet-server-version-regex (re-pattern (str \"Puppet Server version: \"\n+                                                           (version-check/get-version-string \"puppet-server\")))\n+              puppet-version-regex (re-pattern (str \"Puppet version: \" (:puppet-version (config/get-puppet-config jruby-service))))\n+              puppet-api-regex (re-pattern (str \"Supported /puppet API versions: \" master/puppet-API-versions))\n+              puppet-ca-api-regex (re-pattern (str \"Supported /puppet-ca API versions: \" master/puppet-ca-API-versions))]\n+          (testing \"Puppet 3 Master URLs are no longer valid\"\n+            (let [response (http-client/get\n+                             \"https://localhost:8140/production/catalog/localhost\"\n+                             bootstrap/request-options)]\n+              (is (= 404 (:status response)))\n+              (is (re-find puppet-server-version-regex (:body response)))\n+              (is (re-find puppet-version-regex (:body response)))\n+              (is (re-find puppet-api-regex (:body response)))\n+              (is (re-find puppet-ca-api-regex (:body response)))))\n+\n+          (testing \"Puppet 3 CA URLs are no longer valid\"","path":"test/integration/puppetlabs/puppetserver/error_handling_int_test.clj","position":41,"original_position":41,"commit_id":"58cdcb2fbc47398f65365d3205070f08d2c05c0c","original_commit_id":"1d3075037a7c04e7d1d08dc184dc6bd6c85e3d87","user":{"login":"jeffmccune","id":8972,"avatar_url":"https://avatars.githubusercontent.com/u/8972?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffmccune","html_url":"https://github.com/jeffmccune","followers_url":"https://api.github.com/users/jeffmccune/followers","following_url":"https://api.github.com/users/jeffmccune/following{/other_user}","gists_url":"https://api.github.com/users/jeffmccune/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffmccune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffmccune/subscriptions","organizations_url":"https://api.github.com/users/jeffmccune/orgs","repos_url":"https://api.github.com/users/jeffmccune/repos","events_url":"https://api.github.com/users/jeffmccune/events{/privacy}","received_events_url":"https://api.github.com/users/jeffmccune/received_events","type":"User","site_admin":false},"body":"These are great, but we need one more test where a request is made that has never been valid.  For example, when I request `/foo/bar/baz/this/has/never/been/vaid`, I get a response that does _not_ inform the user to upgrade the agent.","created_at":"2015-01-30T23:53:11Z","updated_at":"2015-01-30T23:53:11Z","html_url":"https://github.com/puppetlabs/puppet-server/pull/371#discussion_r23881536","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/comments/23881536"},"html":{"href":"https://github.com/puppetlabs/puppet-server/pull/371#discussion_r23881536"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371","id":28147899,"html_url":"https://github.com/puppetlabs/puppet-server/pull/371","diff_url":"https://github.com/puppetlabs/puppet-server/pull/371.diff","patch_url":"https://github.com/puppetlabs/puppet-server/pull/371.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet-server/issues/371","number":371,"state":"open","locked":false,"title":"(FOR REVIEW) (SERVER-300) Craft special 404 error message","user":{"login":"fpringvaldsen","id":5620801,"avatar_url":"https://avatars.githubusercontent.com/u/5620801?v=3","gravatar_id":"","url":"https://api.github.com/users/fpringvaldsen","html_url":"https://github.com/fpringvaldsen","followers_url":"https://api.github.com/users/fpringvaldsen/followers","following_url":"https://api.github.com/users/fpringvaldsen/following{/other_user}","gists_url":"https://api.github.com/users/fpringvaldsen/gists{/gist_id}","starred_url":"https://api.github.com/users/fpringvaldsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpringvaldsen/subscriptions","organizations_url":"https://api.github.com/users/fpringvaldsen/orgs","repos_url":"https://api.github.com/users/fpringvaldsen/repos","events_url":"https://api.github.com/users/fpringvaldsen/events{/privacy}","received_events_url":"https://api.github.com/users/fpringvaldsen/received_events","type":"User","site_admin":false},"body":"Craft a special 404 error message that occurs when a request is\r\nmade to a route that does not contain the prefix for the Master\r\nor CA services. This 404 error messages explains that the URLs\r\nhave been changed in Puppet 4 and that the agent should be\r\nupgraded.\r\n\r\nI'm marking this as FOR REVIEW because I'm fairly certain that the 404 error message I created is definitely going to need some work, and there's going to need to be some discussion on what exactly it should say. I wanted to get something up so people could look, discuss, and provide feedback.","created_at":"2015-01-27T21:53:52Z","updated_at":"2015-01-30T23:53:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc77b414bdb3672122ce445e99276aaeaf0cbc99","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/comments/{number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet-server/issues/371/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet-server/statuses/58cdcb2fbc47398f65365d3205070f08d2c05c0c","head":{"label":"fpringvaldsen:SERVER-300-404-errors","ref":"SERVER-300-404-errors","sha":"58cdcb2fbc47398f65365d3205070f08d2c05c0c","user":{"login":"fpringvaldsen","id":5620801,"avatar_url":"https://avatars.githubusercontent.com/u/5620801?v=3","gravatar_id":"","url":"https://api.github.com/users/fpringvaldsen","html_url":"https://github.com/fpringvaldsen","followers_url":"https://api.github.com/users/fpringvaldsen/followers","following_url":"https://api.github.com/users/fpringvaldsen/following{/other_user}","gists_url":"https://api.github.com/users/fpringvaldsen/gists{/gist_id}","starred_url":"https://api.github.com/users/fpringvaldsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpringvaldsen/subscriptions","organizations_url":"https://api.github.com/users/fpringvaldsen/orgs","repos_url":"https://api.github.com/users/fpringvaldsen/repos","events_url":"https://api.github.com/users/fpringvaldsen/events{/privacy}","received_events_url":"https://api.github.com/users/fpringvaldsen/received_events","type":"User","site_admin":false},"repo":{"id":24656237,"name":"puppet-server","full_name":"fpringvaldsen/puppet-server","owner":{"login":"fpringvaldsen","id":5620801,"avatar_url":"https://avatars.githubusercontent.com/u/5620801?v=3","gravatar_id":"","url":"https://api.github.com/users/fpringvaldsen","html_url":"https://github.com/fpringvaldsen","followers_url":"https://api.github.com/users/fpringvaldsen/followers","following_url":"https://api.github.com/users/fpringvaldsen/following{/other_user}","gists_url":"https://api.github.com/users/fpringvaldsen/gists{/gist_id}","starred_url":"https://api.github.com/users/fpringvaldsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpringvaldsen/subscriptions","organizations_url":"https://api.github.com/users/fpringvaldsen/orgs","repos_url":"https://api.github.com/users/fpringvaldsen/repos","events_url":"https://api.github.com/users/fpringvaldsen/events{/privacy}","received_events_url":"https://api.github.com/users/fpringvaldsen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fpringvaldsen/puppet-server","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/fpringvaldsen/puppet-server","forks_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/forks","keys_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/teams","hooks_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/hooks","issue_events_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/issues/events{/number}","events_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/events","assignees_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/assignees{/user}","branches_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/branches{/branch}","tags_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/tags","blobs_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/statuses/{sha}","languages_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/languages","stargazers_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/stargazers","contributors_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/contributors","subscribers_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/subscribers","subscription_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/subscription","commits_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/contents/{+path}","compare_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/merges","archive_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/downloads","issues_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/issues{/number}","pulls_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/pulls{/number}","milestones_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/milestones{/number}","notifications_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/labels{/name}","releases_url":"https://api.github.com/repos/fpringvaldsen/puppet-server/releases{/id}","created_at":"2014-09-30T21:24:08Z","updated_at":"2015-01-28T19:26:52Z","pushed_at":"2015-01-30T23:50:34Z","git_url":"git://github.com/fpringvaldsen/puppet-server.git","ssh_url":"git@github.com:fpringvaldsen/puppet-server.git","clone_url":"https://github.com/fpringvaldsen/puppet-server.git","svn_url":"https://github.com/fpringvaldsen/puppet-server","homepage":"https://tickets.puppetlabs.com/browse/SERVER","size":1793,"stargazers_count":0,"watchers_count":0,"language":"Clojure","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":"puppetlabs:master","ref":"master","sha":"5a55804acf45ffaca7ae315a58c8551b3ee46e0e","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":19546488,"name":"puppet-server","full_name":"puppetlabs/puppet-server","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet-server","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet-server","forks_url":"https://api.github.com/repos/puppetlabs/puppet-server/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet-server/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet-server/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet-server/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet-server/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet-server/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet-server/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet-server/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet-server/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet-server/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet-server/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet-server/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet-server/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet-server/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet-server/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet-server/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet-server/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet-server/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet-server/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet-server/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet-server/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet-server/releases{/id}","created_at":"2014-05-07T19:00:24Z","updated_at":"2015-01-29T21:27:33Z","pushed_at":"2015-01-29T21:27:33Z","git_url":"git://github.com/puppetlabs/puppet-server.git","ssh_url":"git@github.com:puppetlabs/puppet-server.git","clone_url":"https://github.com/puppetlabs/puppet-server.git","svn_url":"https://github.com/puppetlabs/puppet-server","homepage":"https://tickets.puppetlabs.com/browse/SERVER","size":4260,"stargazers_count":79,"watchers_count":79,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":5,"forks":41,"open_issues":5,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371"},"html":{"href":"https://github.com/puppetlabs/puppet-server/pull/371"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/issues/371"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/issues/371/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/pulls/371/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet-server/statuses/58cdcb2fbc47398f65365d3205070f08d2c05c0c"}}}}