GitHub PullRequestReviewCommentEvent at 2014-04-08 12:18:47
Repository: core
Actor: kacfengine
Payload: {"comment":{"url":"https://api.github.com/repos/cfengine/core/pulls/comments/11386818","id":11386818,"diff_hunk":"@@ -32,244 +32,320 @@ body package_method test_method_filerepo(currentdir)\n       package_name_convention => \"$(name)-$(version).$(arch).rpm\";\n }\n \n+body package_method test_method_packagerepo(currentdir)\n+{\n+      package_changes => \"individual\";\n+      package_list_command => \"$(G.cat) $(currentdir)/test_repository/installed.txt\";\n+      package_installed_regex => \"i .*\";\n+      package_list_name_regex    => \"^[ia] (\\S+?)\\s\\S+?\\s\\S+$\";\n+      package_list_version_regex => \"^[ia] \\S+?\\s(\\S+?)\\s\\S+$\";\n+      package_list_arch_regex    => \"^[ia] \\S+?\\s\\S+?\\s(\\S+)$\";\n+\n+      package_add_command    => \"$(G.echo) >>$(G.testfile) packagerepo ADD\";\n+      package_update_command => \"$(G.echo) >>$(G.testfile) packagerepo UPDATE\";\n+      package_delete_command => \"$(G.echo) >>$(G.testfile) packagerepo DELETE\";\n+\n+      package_name_convention => \"$(name)-$(version).$(arch).rpm\";\n+}\n+\n bundle agent test\n {\n   packages:\n-    \"install-exact-version\"\n+\n+      # Redmine#2986: make sure a partial name does not install a package\n+      \"long-name-should-not-be\"\n+      package_policy => \"addupdate\",\n+      package_architectures => { \"i386\" }, # required to avoid false positives: specify the architecture\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      # Redmine#2986: make sure a wildcard in the package name is respected\n+      \"long-name-should-be-wildcard*\"\n+      package_policy => \"addupdate\",\n+      # note that the package architecture doesn't have to be specified in this case\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      # Redmine#2986: make sure a substring name does NOT add or update a package\n+      \"substring-name\"\n+      package_policy => \"addupdate\",\n+      package_version => \"99999999\", # required: specify a huge version\n+      package_architectures => { \"i386\" }, # required: specify the architecture\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      # Redmine#2986: make sure a substring name does NOT add or update a package with a specially formatted version string\n+      \"substring2-name\"\n+      package_policy => \"addupdate\",\n+      package_version => \"[0-9].*\", # required: specify a regex to match versions only\n+      package_architectures => { \"i386\" }, # required: specify the architecture\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      # Redmine#5245: make sure a full name updates a package\n+      \"long-name-should-be-updated\"\n+      package_policy => \"addupdate\",\n+      package_version => \"99999999\", # required: specify a huge version\n+      package_architectures => { \"i386\" }, # required: specify the architecture\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      ##########################################################################\n+\n+      \"install-exact-version\"\n+      package_policy => \"addupdate\",\n+      package_select => \"==\",\n+      package_version => \"2.2.3\",\n+      package_architectures => { \"i386\" },\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      \"update-to-exact-version\"\n+      package_policy => \"addupdate\",\n+      package_select => \"==\",\n+      package_version => \"2.2.3\",\n+      package_architectures => { \"i386\" },\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      \"delete-exact-version\"\n+      package_policy => \"delete\",\n+      package_select => \"==\",\n+      package_version => \"2.2.3\",\n+      package_architectures => { \"i386\" },\n+      package_method => test_method_packagerepo($(this.promise_dirname));\n+\n+      ##########################################################################\n+\n+      \"install-exact-version\"\n       package_policy => \"addupdate\",\n       package_select => \"==\",\n       package_version => \"2.2.3\",\n       package_architectures => { \"i386\" },\n       package_method => test_method_filerepo($(this.promise_dirname));\n \n-    \"update-to-exact-version\"\n+      \"update-to-exact-version\"","path":"tests/acceptance/07_packages/repositories.cf.sub","position":91,"original_position":91,"commit_id":"4efe7f02bbcc2282157b53651a1323ab118566fd","original_commit_id":"4efe7f02bbcc2282157b53651a1323ab118566fd","user":{"login":"kacfengine","id":4037094,"avatar_url":"https://avatars.githubusercontent.com/u/4037094?","gravatar_id":"051c8986741264f2671890948d4f4d30","url":"https://api.github.com/users/kacfengine","html_url":"https://github.com/kacfengine","followers_url":"https://api.github.com/users/kacfengine/followers","following_url":"https://api.github.com/users/kacfengine/following{/other_user}","gists_url":"https://api.github.com/users/kacfengine/gists{/gist_id}","starred_url":"https://api.github.com/users/kacfengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kacfengine/subscriptions","organizations_url":"https://api.github.com/users/kacfengine/orgs","repos_url":"https://api.github.com/users/kacfengine/repos","events_url":"https://api.github.com/users/kacfengine/events{/privacy}","received_events_url":"https://api.github.com/users/kacfengine/received_events","type":"User","site_admin":false},"body":"Isn't this a very inconvenient indentation policy? If you don't separate with a blank line it's very hard to see where one promise ends and another begins.","created_at":"2014-04-08T12:18:47Z","updated_at":"2014-04-08T12:18:47Z","html_url":"https://github.com/cfengine/core/pull/1625#discussion_r11386818","pull_request_url":"https://api.github.com/repos/cfengine/core/pulls/1625","_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments/11386818"},"html":{"href":"https://github.com/cfengine/core/pull/1625#discussion_r11386818"},"pull_request":{"href":"https://api.github.com/repos/cfengine/core/pulls/1625"}}}}