)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"61511bb7aebd6ada98dfb8c0a6e584390d8c2db0","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch modifies the Rakefile to:"},{"line_number":14,"context_line":"* clean spec_prep and spec_clean Rake tasks"},{"line_number":15,"context_line":"* use openstack/puppet-openstack-integration/isntall_modules.sh script"},{"line_number":16,"context_line":"  to clone modules, like it\u0027s done with Beaker."},{"line_number":17,"context_line":"* do not use .fixtures.yaml file to clone modules and rely on"},{"line_number":18,"context_line":"  zuul-cloner or git."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba15a1d1_7ed2c501","line":15,"updated":"2015-09-23 18:13:27.000000000","message":"install_module.sh","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7f5fa43d1984d509de5f15da514ee357fdf24492","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch modifies the Rakefile to:"},{"line_number":14,"context_line":"* clean spec_prep and spec_clean Rake tasks"},{"line_number":15,"context_line":"* use openstack/puppet-openstack-integration/isntall_modules.sh script"},{"line_number":16,"context_line":"  to clone modules, like it\u0027s done with Beaker."},{"line_number":17,"context_line":"* do not use .fixtures.yaml file to clone modules and rely on"},{"line_number":18,"context_line":"  zuul-cloner or git."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba15a1d1_9911f354","line":15,"in_reply_to":"ba15a1d1_7ed2c501","updated":"2015-09-23 18:28:28.000000000","message":"Done","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":8797,"name":"Andrew Woodward","email":"xarses@gmail.com","username":"xarses"},"change_message_id":"405282c27a2ca576ba183750ea32c1d21d5033f5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  zuul-cloner or git."},{"line_number":19,"context_line":"* Add openstack/ in gitignore so we never commit the"},{"line_number":20,"context_line":"  puppet-openstack-integration repository (can happen when spec_clean"},{"line_number":21,"context_line":"  did nor run but you want to submit the patch anyway)"},{"line_number":22,"context_line":"* Allow to run a custom Puppetfile if PUPPETFILE env is exported. It"},{"line_number":23,"context_line":"  will allow people to test the module with the dependencies they like,"},{"line_number":24,"context_line":"  feature we had with .fixtures.yaml."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"7a2fa921_5e90b795","line":21,"updated":"2015-10-05 23:01:32.000000000","message":"s/nor/not ?","commit_id":"730004d2765d96bebf8c3594a262f16df0183b46"}],"Rakefile":[{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"61511bb7aebd6ada98dfb8c0a6e584390d8c2db0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"require \u0027json\u0027"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"modname \u003d JSON.parse(open(\u0027metadata.json\u0027).read)[\u0027name\u0027].split(\u0027-\u0027)[1]"},{"line_number":7,"context_line":"TDIR \u003d File.expand_path(File.dirname(__FILE__))"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PuppetSyntax.exclude_paths ||\u003d []"},{"line_number":10,"context_line":"PuppetSyntax.exclude_paths \u003c\u003c \"spec/fixtures/**/*\""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_def431f2","line":7,"updated":"2015-09-23 18:13:27.000000000","message":"This is useless. Rake put all the task in the base directory. Try:\n\n  cd lib\n  bundle exec rake spec_clean\n  bundle exec rake spec_prep\n\nthe file are created at the right position even if the rake task are defined (in /home/chem/.gem/ruby/gems/puppetlabs_spec_helper-0.10.3/lib/puppetlabs_spec_helper/rake_tasks.rb) using relative path.","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7f5fa43d1984d509de5f15da514ee357fdf24492","unresolved":false,"context_lines":[{"line_number":4,"context_line":"require \u0027json\u0027"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"modname \u003d JSON.parse(open(\u0027metadata.json\u0027).read)[\u0027name\u0027].split(\u0027-\u0027)[1]"},{"line_number":7,"context_line":"TDIR \u003d File.expand_path(File.dirname(__FILE__))"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PuppetSyntax.exclude_paths ||\u003d []"},{"line_number":10,"context_line":"PuppetSyntax.exclude_paths \u003c\u003c \"spec/fixtures/**/*\""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_592efb8c","line":7,"in_reply_to":"ba15a1d1_def431f2","updated":"2015-09-23 18:28:28.000000000","message":"it\u0027s safer to use absolute paths rather relatives. So I would prefer to keep this variable.","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"61511bb7aebd6ada98dfb8c0a6e584390d8c2db0","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Rake::Task[:spec_prep].clear"},{"line_number":28,"context_line":"desc \u0027Create the fixtures directory\u0027"},{"line_number":29,"context_line":"task :spec_prep do"},{"line_number":30,"context_line":"  zuul_ref \u003d ENV[\u0027ZUUL_REF\u0027]"},{"line_number":31,"context_line":"  zuul_branch \u003d ENV[\u0027ZUUL_BRANCH\u0027]"},{"line_number":32,"context_line":"  zuul_url \u003d ENV[\u0027ZUUL_URL\u0027]"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_1ed6294f","line":29,"updated":"2015-09-23 18:13:27.000000000","message":"In my opinion you shouldn\u0027t override the spec_prep task but create a new one like spec_zool_prep. Then you would fail if the zuul-cloner file is absent. Then I wouldn\u0027t remove the .fixture.yml file. But maybe I miss something here.","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7f5fa43d1984d509de5f15da514ee357fdf24492","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Rake::Task[:spec_prep].clear"},{"line_number":28,"context_line":"desc \u0027Create the fixtures directory\u0027"},{"line_number":29,"context_line":"task :spec_prep do"},{"line_number":30,"context_line":"  zuul_ref \u003d ENV[\u0027ZUUL_REF\u0027]"},{"line_number":31,"context_line":"  zuul_branch \u003d ENV[\u0027ZUUL_BRANCH\u0027]"},{"line_number":32,"context_line":"  zuul_url \u003d ENV[\u0027ZUUL_URL\u0027]"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_d9cbeba2","line":29,"in_reply_to":"ba15a1d1_1ed6294f","updated":"2015-09-23 18:28:28.000000000","message":"This is the goal of this patch.\nThe problem we have today is:\n\n* our modules have inconsistent fixtures file\n* fixtures file are different with what we test in beaker \u0026 integration testing\n\nSo we\u0027re running unit testing on something that we don\u0027t test anymore.","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"61511bb7aebd6ada98dfb8c0a6e584390d8c2db0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"  else"},{"line_number":44,"context_line":"    sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":45,"context_line":"  end"},{"line_number":46,"context_line":"  sh(\"PUPPETFILE_DIR\u003d#{TDIR}/spec/fixtures/modules ZUUL_REF\u003d#{zuul_ref} ZUUL_BRANCH\u003d#{zuul_branch} ZUUL_URL\u003d#{zuul_url} bash #{repo}/install_modules.sh\")"},{"line_number":47,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":48,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":49,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_de5991fe","line":46,"updated":"2015-09-23 18:13:27.000000000","message":"You can safely remoev TDIR here.\n\nAlso, it would be better to have a split command. From the comment in Rake::FileUtils:\n\n   # It is recommended you use the multiple argument form over interpolating \n   # user input for both usability and security reasons.  With the multiple \n   # argument form you can easily process files with spaces or other shell \n   # reserved characters in them.  With the multiple argument form your rake \n   # tasks are not vulnerable to users providing an argument like \n   # \u003ccode\u003e; rm # -rf /\u003c/code\u003e. \n\nYou could do something like this: \n  zuul_clone_cmd \u003d [] \n  zuul_clone_cmd +\u003d [\u0027--cache-dir\u0027, \u0027/opt/git\u0027] \n  zuul_clone_cmd +\u003d [\u0027--zuul-ref\u0027, zuul_ref] \n  ... \n  sh(zuul_clone_cmd) # note the relative path here for repo\n  sh(\"env\", \"\"PUPPETFILE_DIR\u003dspec/fixtures/modules\", \"ZUUL_REF\u003d#{zuul_ref}\", ..., \u0027bash, \"#{repo}/install_modules.sh\")","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7f5fa43d1984d509de5f15da514ee357fdf24492","unresolved":false,"context_lines":[{"line_number":43,"context_line":"  else"},{"line_number":44,"context_line":"    sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":45,"context_line":"  end"},{"line_number":46,"context_line":"  sh(\"PUPPETFILE_DIR\u003d#{TDIR}/spec/fixtures/modules ZUUL_REF\u003d#{zuul_ref} ZUUL_BRANCH\u003d#{zuul_branch} ZUUL_URL\u003d#{zuul_url} bash #{repo}/install_modules.sh\")"},{"line_number":47,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":48,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":49,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_794c1f42","line":46,"in_reply_to":"ba15a1d1_de5991fe","updated":"2015-09-23 18:28:28.000000000","message":"I honestly think absolute paths are safer than relative paths.\n\nAnd yes, I can split the command. Will do in next patchset.","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"61511bb7aebd6ada98dfb8c0a6e584390d8c2db0","unresolved":false,"context_lines":[{"line_number":47,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":48,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":49,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"},{"line_number":50,"context_line":"  FileUtils::touch(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":51,"context_line":"end"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_be0b7dd4","line":50,"updated":"2015-09-23 18:13:27.000000000","message":"Should remove TDIR","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7f5fa43d1984d509de5f15da514ee357fdf24492","unresolved":false,"context_lines":[{"line_number":47,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":48,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":49,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"},{"line_number":50,"context_line":"  FileUtils::touch(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":51,"context_line":"end"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_1932c3a7","line":50,"in_reply_to":"ba15a1d1_be0b7dd4","updated":"2015-09-23 18:28:28.000000000","message":"ditto","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"61511bb7aebd6ada98dfb8c0a6e584390d8c2db0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"desc \u0027Clean up the fixtures directory\u0027"},{"line_number":55,"context_line":"task :spec_clean do"},{"line_number":56,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules\")"},{"line_number":57,"context_line":"  FileUtils::rm_rf(\"#{repo}\")"},{"line_number":58,"context_line":"  if File.zero?(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":59,"context_line":"    FileUtils::rm_f(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":60,"context_line":"  end"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_fe2c954b","line":57,"updated":"2015-09-23 18:13:27.000000000","message":"repo is undefined here, I think. Furthermore the double quote are not needed.","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7f5fa43d1984d509de5f15da514ee357fdf24492","unresolved":false,"context_lines":[{"line_number":54,"context_line":"desc \u0027Clean up the fixtures directory\u0027"},{"line_number":55,"context_line":"task :spec_clean do"},{"line_number":56,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules\")"},{"line_number":57,"context_line":"  FileUtils::rm_rf(\"#{repo}\")"},{"line_number":58,"context_line":"  if File.zero?(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":59,"context_line":"    FileUtils::rm_f(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":60,"context_line":"  end"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_991ed30a","line":57,"in_reply_to":"ba15a1d1_fe2c954b","updated":"2015-09-23 18:28:28.000000000","message":"ok, will fix in next patchset","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"61511bb7aebd6ada98dfb8c0a6e584390d8c2db0","unresolved":false,"context_lines":[{"line_number":57,"context_line":"  FileUtils::rm_rf(\"#{repo}\")"},{"line_number":58,"context_line":"  if File.zero?(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":59,"context_line":"    FileUtils::rm_f(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":60,"context_line":"  end"},{"line_number":61,"context_line":"end"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_9ecc798a","line":60,"updated":"2015-09-23 18:13:27.000000000","message":"I think I would go this way. Make a new task which depend on :spec_clean and add removal of leftover file:\n\ntask :spec_zuul_clean \u003d\u003e :spec_clean do\n  FileUtils::rm_rf(repo)\n...","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7f5fa43d1984d509de5f15da514ee357fdf24492","unresolved":false,"context_lines":[{"line_number":57,"context_line":"  FileUtils::rm_rf(\"#{repo}\")"},{"line_number":58,"context_line":"  if File.zero?(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":59,"context_line":"    FileUtils::rm_f(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":60,"context_line":"  end"},{"line_number":61,"context_line":"end"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"ba15a1d1_b9d95758","line":60,"in_reply_to":"ba15a1d1_9ecc798a","updated":"2015-09-23 18:28:28.000000000","message":"ditto of comment #1","commit_id":"2d0eaa9819de784ff370f7e7da51a98e6fae868e"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"6783b29968a409fc86f0b30d4151c1107f88099b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"require \u0027json\u0027"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"modname \u003d JSON.parse(open(\u0027metadata.json\u0027).read)[\u0027name\u0027].split(\u0027-\u0027)[1]"},{"line_number":7,"context_line":"TDIR \u003d File.expand_path(File.dirname(__FILE__))"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PuppetSyntax.exclude_paths ||\u003d []"},{"line_number":10,"context_line":"PuppetSyntax.exclude_paths \u003c\u003c \"spec/fixtures/**/*\""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_70b178df","line":7,"updated":"2015-09-24 09:26:29.000000000","message":"This is not safer than relative path.  If for instance those tasks move to a Gemfile, then the path returned by idiom would be somewhere in /var/lib/ruby...\nThis is really the rake jobs to determine the root path of the project, which it does very well.  The way it does it is more robust: https://github.com/ruby/rake/blob/master/lib/rake/application.rb#L657-L667","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"d54969101686e19a0909f8c1eb47231b881ff292","unresolved":false,"context_lines":[{"line_number":4,"context_line":"require \u0027json\u0027"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"modname \u003d JSON.parse(open(\u0027metadata.json\u0027).read)[\u0027name\u0027].split(\u0027-\u0027)[1]"},{"line_number":7,"context_line":"TDIR \u003d File.expand_path(File.dirname(__FILE__))"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PuppetSyntax.exclude_paths ||\u003d []"},{"line_number":10,"context_line":"PuppetSyntax.exclude_paths \u003c\u003c \"spec/fixtures/**/*\""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"9a1a9d01_d7b91cee","line":7,"in_reply_to":"ba15a1d1_70b178df","updated":"2015-09-24 13:49:43.000000000","message":"See L46 why we need TDIR.","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"6783b29968a409fc86f0b30d4151c1107f88099b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"  zuul_url \u003d ENV[\u0027ZUUL_URL\u0027]"},{"line_number":33,"context_line":"  repo \u003d \u0027openstack/puppet-openstack-integration\u0027"},{"line_number":34,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules\")"},{"line_number":35,"context_line":"  if File.exists?(\u0027/usr/zuul-env/bin/zuul-cloner\u0027)"},{"line_number":36,"context_line":"    zuul_clone_cmd \u003d \u0027/usr/zuul-env/bin/zuul-cloner \u0027"},{"line_number":37,"context_line":"    zuul_clone_cmd +\u003d \u0027--cache-dir /opt/git \u0027"},{"line_number":38,"context_line":"    zuul_clone_cmd +\u003d \"--zuul-ref #{zuul_ref} \""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_10cd9c65","line":35,"updated":"2015-09-24 09:26:29.000000000","message":"So if this is the only way to make the tests (ie, you won\u0027t add :spec_zuul_prep and so on) then zuul-cloner becomes a requirement. You should fail here with a helpful message on how to install zuul-cloner","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"30e55f65870d46f9f21140b6a71bc73545ae98b0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"  zuul_url \u003d ENV[\u0027ZUUL_URL\u0027]"},{"line_number":33,"context_line":"  repo \u003d \u0027openstack/puppet-openstack-integration\u0027"},{"line_number":34,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules\")"},{"line_number":35,"context_line":"  if File.exists?(\u0027/usr/zuul-env/bin/zuul-cloner\u0027)"},{"line_number":36,"context_line":"    zuul_clone_cmd \u003d \u0027/usr/zuul-env/bin/zuul-cloner \u0027"},{"line_number":37,"context_line":"    zuul_clone_cmd +\u003d \u0027--cache-dir /opt/git \u0027"},{"line_number":38,"context_line":"    zuul_clone_cmd +\u003d \"--zuul-ref #{zuul_ref} \""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_c4044616","line":35,"in_reply_to":"ba15a1d1_10cd9c65","updated":"2015-09-24 11:05:14.000000000","message":"Sorry, I misunderstood the code.  It still works without zuul.  Ignore the above comment.","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"6783b29968a409fc86f0b30d4151c1107f88099b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    zuul_clone_cmd +\u003d \"--zuul-branch #{zuul_branch} \""},{"line_number":40,"context_line":"    zuul_clone_cmd +\u003d \"--zuul-url #{zuul_url} \""},{"line_number":41,"context_line":"    zuul_clone_cmd +\u003d \"git://git.openstack.org #{repo}\""},{"line_number":42,"context_line":"    sh(zuul_clone_cmd)"},{"line_number":43,"context_line":"  else"},{"line_number":44,"context_line":"    sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":45,"context_line":"  end"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_30c8e054","line":42,"updated":"2015-09-24 09:26:29.000000000","message":"You should use array instead of string see comment in patchset #6","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"d54969101686e19a0909f8c1eb47231b881ff292","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    zuul_clone_cmd +\u003d \"--zuul-branch #{zuul_branch} \""},{"line_number":40,"context_line":"    zuul_clone_cmd +\u003d \"--zuul-url #{zuul_url} \""},{"line_number":41,"context_line":"    zuul_clone_cmd +\u003d \"git://git.openstack.org #{repo}\""},{"line_number":42,"context_line":"    sh(zuul_clone_cmd)"},{"line_number":43,"context_line":"  else"},{"line_number":44,"context_line":"    sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":45,"context_line":"  end"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"9a1a9d01_77cb7073","line":42,"in_reply_to":"ba15a1d1_30c8e054","updated":"2015-09-24 13:49:43.000000000","message":"will do in next patchset.","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"6783b29968a409fc86f0b30d4151c1107f88099b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    zuul_clone_cmd +\u003d \"git://git.openstack.org #{repo}\""},{"line_number":42,"context_line":"    sh(zuul_clone_cmd)"},{"line_number":43,"context_line":"  else"},{"line_number":44,"context_line":"    sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":45,"context_line":"  end"},{"line_number":46,"context_line":"  script \u003d \"PUPPETFILE_DIR\u003d#{TDIR}/spec/fixtures/modules \""},{"line_number":47,"context_line":"  script +\u003d \"ZUUL_REF\u003d#{zuul_ref} \""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_d0c2c433","line":44,"updated":"2015-09-24 09:26:29.000000000","message":"Idem","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"d54969101686e19a0909f8c1eb47231b881ff292","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    zuul_clone_cmd +\u003d \"git://git.openstack.org #{repo}\""},{"line_number":42,"context_line":"    sh(zuul_clone_cmd)"},{"line_number":43,"context_line":"  else"},{"line_number":44,"context_line":"    sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":45,"context_line":"  end"},{"line_number":46,"context_line":"  script \u003d \"PUPPETFILE_DIR\u003d#{TDIR}/spec/fixtures/modules \""},{"line_number":47,"context_line":"  script +\u003d \"ZUUL_REF\u003d#{zuul_ref} \""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"9a1a9d01_d7a03ca8","line":44,"in_reply_to":"ba15a1d1_d0c2c433","updated":"2015-09-24 13:49:43.000000000","message":"ditto","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"d54969101686e19a0909f8c1eb47231b881ff292","unresolved":false,"context_lines":[{"line_number":43,"context_line":"  else"},{"line_number":44,"context_line":"    sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":45,"context_line":"  end"},{"line_number":46,"context_line":"  script \u003d \"PUPPETFILE_DIR\u003d#{TDIR}/spec/fixtures/modules \""},{"line_number":47,"context_line":"  script +\u003d \"ZUUL_REF\u003d#{zuul_ref} \""},{"line_number":48,"context_line":"  script +\u003d \"ZUUL_BRANCH\u003d#{zuul_branch} \""},{"line_number":49,"context_line":"  script +\u003d \"ZUUL_URL\u003d#{zuul_url} \""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"9a1a9d01_57d18cfa","line":46,"updated":"2015-09-24 13:49:43.000000000","message":"So this is why we need TDIR:\n\nThe patch is passed to a script that will be used to clone modules.\n\nIf we pass PUPPETFILE_DIR\u003d\"spec/fixtures/modules\", it will clone the modules in \u003cmodule\u003e/openstack/puppet-openstack-integration/spec/fixtures/modules and Rake file fail to run rspec.\n\nYes I could use PUPPETFILE_DIR\u003d\"../../spec/fixtures/modules\" but this is hardcoding path while we could use a variable that is computed by Rake.\n\nI don\u0027t understand why you don\u0027t want absolute path here.","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"6783b29968a409fc86f0b30d4151c1107f88099b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  script +\u003d \"ZUUL_BRANCH\u003d#{zuul_branch} \""},{"line_number":49,"context_line":"  script +\u003d \"ZUUL_URL\u003d#{zuul_url} \""},{"line_number":50,"context_line":"  script +\u003d \"bash #{repo}/install_modules.sh\""},{"line_number":51,"context_line":"  sh(script)"},{"line_number":52,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":53,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":54,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_f0bd88b1","line":51,"updated":"2015-09-24 09:26:29.000000000","message":"Idem","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"d54969101686e19a0909f8c1eb47231b881ff292","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  script +\u003d \"ZUUL_BRANCH\u003d#{zuul_branch} \""},{"line_number":49,"context_line":"  script +\u003d \"ZUUL_URL\u003d#{zuul_url} \""},{"line_number":50,"context_line":"  script +\u003d \"bash #{repo}/install_modules.sh\""},{"line_number":51,"context_line":"  sh(script)"},{"line_number":52,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":53,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":54,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"9a1a9d01_97aac484","line":51,"in_reply_to":"ba15a1d1_f0bd88b1","updated":"2015-09-24 13:49:43.000000000","message":"ditto","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"6783b29968a409fc86f0b30d4151c1107f88099b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":53,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":54,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"},{"line_number":55,"context_line":"  FileUtils::touch(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":56,"context_line":"end"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_90df6c0c","line":55,"updated":"2015-09-24 09:26:29.000000000","message":"You don\u0027t need FileUtils here.  All those fonctions are wrapped in rake/lib/rake/file_utils_ext","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"d54969101686e19a0909f8c1eb47231b881ff292","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":53,"context_line":"  FileUtils::ln_s(TDIR, \"#{TDIR}/spec/fixtures/modules/#{modname}\")"},{"line_number":54,"context_line":"  FileUtils::mkdir_p(\"#{TDIR}/spec/fixtures/manifests\")"},{"line_number":55,"context_line":"  FileUtils::touch(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":56,"context_line":"end"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"9a1a9d01_17f2349b","line":55,"in_reply_to":"ba15a1d1_90df6c0c","updated":"2015-09-24 13:49:43.000000000","message":"ok, will look.","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"6783b29968a409fc86f0b30d4151c1107f88099b","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules\")"},{"line_number":63,"context_line":"  FileUtils::rm_rf(repo)"},{"line_number":64,"context_line":"  if File.zero?(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":65,"context_line":"    FileUtils::rm_f(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":66,"context_line":"  end"},{"line_number":67,"context_line":"end"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"ba15a1d1_b0e2b0d3","line":65,"updated":"2015-09-24 09:26:29.000000000","message":"No need for FileUtils","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"d54969101686e19a0909f8c1eb47231b881ff292","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  FileUtils::rm_rf(\"#{TDIR}/spec/fixtures/modules\")"},{"line_number":63,"context_line":"  FileUtils::rm_rf(repo)"},{"line_number":64,"context_line":"  if File.zero?(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":65,"context_line":"    FileUtils::rm_f(\"#{TDIR}/spec/fixtures/manifests/site.pp\")"},{"line_number":66,"context_line":"  end"},{"line_number":67,"context_line":"end"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"9a1a9d01_37ef38b2","line":65,"in_reply_to":"ba15a1d1_b0e2b0d3","updated":"2015-09-24 13:49:43.000000000","message":"ditto","commit_id":"f39a8725778f6d5430b78b9f4f55f8d90327a99b"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"eccb998796490df302f1f1e3fe63cc4cb7d5042f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"      sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":63,"context_line":"    end"},{"line_number":64,"context_line":"    script \u003d [\u0027env\u0027]"},{"line_number":65,"context_line":"    script +\u003d [\"PUPPETFILE_DIR\u003d#{Dir.pwd}/spec/fixtures/modules\"]"},{"line_number":66,"context_line":"    script +\u003d [\"ZUUL_REF\u003d#{zuul_ref}\"]"},{"line_number":67,"context_line":"    script +\u003d [\"ZUUL_BRANCH\u003d#{zuul_branch}\"]"},{"line_number":68,"context_line":"    script +\u003d [\"ZUUL_URL\u003d#{zuul_url}\"]"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"9a1a9d01_33b08cdd","line":65,"updated":"2015-09-25 07:03:28.000000000","message":"This is the only place where Dir.pwd is needed.","commit_id":"13023a5c90e0abd520dfa68b6e2f0cae55e9a40f"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"865431ac7b72a8242360c3cd4867c2139dcf8add","unresolved":false,"context_lines":[{"line_number":62,"context_line":"      sh(\"git clone https://git.openstack.org/#{repo} #{repo}\")"},{"line_number":63,"context_line":"    end"},{"line_number":64,"context_line":"    script \u003d [\u0027env\u0027]"},{"line_number":65,"context_line":"    script +\u003d [\"PUPPETFILE_DIR\u003d#{Dir.pwd}/spec/fixtures/modules\"]"},{"line_number":66,"context_line":"    script +\u003d [\"ZUUL_REF\u003d#{zuul_ref}\"]"},{"line_number":67,"context_line":"    script +\u003d [\"ZUUL_BRANCH\u003d#{zuul_branch}\"]"},{"line_number":68,"context_line":"    script +\u003d [\"ZUUL_URL\u003d#{zuul_url}\"]"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"9a1a9d01_6bdda013","line":65,"in_reply_to":"9a1a9d01_33b08cdd","updated":"2015-09-25 13:28:53.000000000","message":"Done","commit_id":"13023a5c90e0abd520dfa68b6e2f0cae55e9a40f"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"eccb998796490df302f1f1e3fe63cc4cb7d5042f","unresolved":false,"context_lines":[{"line_number":72,"context_line":"  rm_rf(\"#{Dir.pwd}/spec/fixtures/modules/#{modname}\")"},{"line_number":73,"context_line":"  ln_s(Dir.pwd, \"#{Dir.pwd}/spec/fixtures/modules/#{modname}\")"},{"line_number":74,"context_line":"  mkdir_p(\"#{Dir.pwd}/spec/fixtures/manifests\")"},{"line_number":75,"context_line":"  touch(\"#{Dir.pwd}/spec/fixtures/manifests/site.pp\")"},{"line_number":76,"context_line":"end"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"9a1a9d01_33e72ce6","line":75,"updated":"2015-09-25 07:03:28.000000000","message":"You can safely remove those four ${Dir.pwd}/  .","commit_id":"13023a5c90e0abd520dfa68b6e2f0cae55e9a40f"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"865431ac7b72a8242360c3cd4867c2139dcf8add","unresolved":false,"context_lines":[{"line_number":72,"context_line":"  rm_rf(\"#{Dir.pwd}/spec/fixtures/modules/#{modname}\")"},{"line_number":73,"context_line":"  ln_s(Dir.pwd, \"#{Dir.pwd}/spec/fixtures/modules/#{modname}\")"},{"line_number":74,"context_line":"  mkdir_p(\"#{Dir.pwd}/spec/fixtures/manifests\")"},{"line_number":75,"context_line":"  touch(\"#{Dir.pwd}/spec/fixtures/manifests/site.pp\")"},{"line_number":76,"context_line":"end"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"9a1a9d01_8be274d4","line":75,"in_reply_to":"9a1a9d01_33e72ce6","updated":"2015-09-25 13:28:53.000000000","message":"Done","commit_id":"13023a5c90e0abd520dfa68b6e2f0cae55e9a40f"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"eccb998796490df302f1f1e3fe63cc4cb7d5042f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"  rm_rf(repo)"},{"line_number":84,"context_line":"  if File.zero?(\"#{Dir.pwd}/spec/fixtures/manifests/site.pp\")"},{"line_number":85,"context_line":"    rm_f(\"#{Dir.pwd}/spec/fixtures/manifests/site.pp\")"},{"line_number":86,"context_line":"  end"},{"line_number":87,"context_line":"end"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"9a1a9d01_93e2b8d4","line":86,"updated":"2015-09-25 07:03:28.000000000","message":"Here again, those 3 Dir.pwd are redundant.","commit_id":"13023a5c90e0abd520dfa68b6e2f0cae55e9a40f"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"865431ac7b72a8242360c3cd4867c2139dcf8add","unresolved":false,"context_lines":[{"line_number":83,"context_line":"  rm_rf(repo)"},{"line_number":84,"context_line":"  if File.zero?(\"#{Dir.pwd}/spec/fixtures/manifests/site.pp\")"},{"line_number":85,"context_line":"    rm_f(\"#{Dir.pwd}/spec/fixtures/manifests/site.pp\")"},{"line_number":86,"context_line":"  end"},{"line_number":87,"context_line":"end"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"9a1a9d01_4bec5cc7","line":86,"in_reply_to":"9a1a9d01_93e2b8d4","updated":"2015-09-25 13:28:53.000000000","message":"Done","commit_id":"13023a5c90e0abd520dfa68b6e2f0cae55e9a40f"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"44b0a6170dc586d0dab063b9e83b2938e3033a36","unresolved":false,"context_lines":[{"line_number":72,"context_line":"  rm_rf(\"spec/fixtures/modules/#{modname}\")"},{"line_number":73,"context_line":"  ln_s(Dir.pwd, \"spec/fixtures/modules/#{modname}\")"},{"line_number":74,"context_line":"  mkdir_p(\u0027spec/fixtures/manifests\u0027)"},{"line_number":75,"context_line":"  touch(\u0027spec/fixtures/manifests/site.pp\u0027)"},{"line_number":76,"context_line":"end"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":24,"id":"9a1a9d01_ceab831d","line":75,"updated":"2015-10-02 18:27:36.000000000","message":"Why are we linking openstack/ to the fixtures rather than just cloning directly into the fixtures?\n\nTo approximate what the real spec_prep does we shouldn\u0027t be rm -rf\u0027ing anything, this is left for the spec_clean task.","commit_id":"2bada097874e0d6747b611b083e326b40b5691ec"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"0427e3c9c5da565fbb4b6f92aec92375ac02a05e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"  rm_rf(\"spec/fixtures/modules/#{modname}\")"},{"line_number":73,"context_line":"  ln_s(Dir.pwd, \"spec/fixtures/modules/#{modname}\")"},{"line_number":74,"context_line":"  mkdir_p(\u0027spec/fixtures/manifests\u0027)"},{"line_number":75,"context_line":"  touch(\u0027spec/fixtures/manifests/site.pp\u0027)"},{"line_number":76,"context_line":"end"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":24,"id":"9a1a9d01_99edd3b9","line":75,"in_reply_to":"9a1a9d01_99ecf3f4","updated":"2015-10-02 18:46:57.000000000","message":"\"the \u0027fixtures\u0027 approach\" only creates a symlink for the current repository. That\u0027s this section: https://github.com/puppetlabs/puppetlabs_spec_helper/blob/master/lib/puppetlabs_spec_helper/rake_tasks.rb#L130-L137\n\nNotice it doesn\u0027t rm anything.\n\nFor the rest of the modules, it clones unless the file already exists: https://github.com/puppetlabs/puppetlabs_spec_helper/blob/master/lib/puppetlabs_spec_helper/rake_tasks.rb#L130-L137\n\nIt also doesn\u0027t rm anything.\n\nzuul-cloner can use a clone map file to clone directly into a given directory, so we don\u0027t need to clone anything again.\n\nWith this approach spec_prep will always clone things even if the fixtures are already there, which impedes performance. If we copy the puppetlabs_spec_helper spec_prep, it only clones if there is nothing in the fixtures yet.","commit_id":"2bada097874e0d6747b611b083e326b40b5691ec"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"2d7e7a48259c4601eb1966608ff49dcfa9f8cc4f","unresolved":false,"context_lines":[{"line_number":72,"context_line":"  rm_rf(\"spec/fixtures/modules/#{modname}\")"},{"line_number":73,"context_line":"  ln_s(Dir.pwd, \"spec/fixtures/modules/#{modname}\")"},{"line_number":74,"context_line":"  mkdir_p(\u0027spec/fixtures/manifests\u0027)"},{"line_number":75,"context_line":"  touch(\u0027spec/fixtures/manifests/site.pp\u0027)"},{"line_number":76,"context_line":"end"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Rake::Task[:spec_clean].clear"}],"source_content_type":"application/octet-stream","patch_set":24,"id":"9a1a9d01_99ecf3f4","line":75,"in_reply_to":"9a1a9d01_ceab831d","updated":"2015-10-02 18:39:29.000000000","message":"Zuul-cloner is already cloning the module itself, I\u0027m not sure why we would to clone it again.\nI actually take the \"fixtures\" approach which is:\n\n* rm the symlink [1]\n* create the symlink.\n\n[1] it should not be in spec_clean_task because if you stop rake druing the tests run, you won\u0027t be able to run tests again. Doing a symlink on an existing symlink does not work, so let\u0027s clean it before.","commit_id":"2bada097874e0d6747b611b083e326b40b5691ec"}]}
