diff options
author | Frank Becker | 2015-07-15 19:26:56 +0000 |
---|---|---|
committer | Frank Becker | 2015-07-15 19:26:56 +0000 |
commit | 8da0ab938a64501eac38b51e4bf552c4de2f7c5f (patch) | |
tree | 316261623e0214d14a2590c332ab0ed00665cab8 | |
parent | 0c55f4494181d3fa1d32d1e9473188dd6554f8c7 (diff) | |
download | org.eclipse.mylyn.tasks-8da0ab938a64501eac38b51e4bf552c4de2f7c5f.tar.gz org.eclipse.mylyn.tasks-8da0ab938a64501eac38b51e4bf552c4de2f7c5f.tar.xz org.eclipse.mylyn.tasks-8da0ab938a64501eac38b51e4bf552c4de2f7c5f.zip |
472116: update Bugzilla repository to 5.0 final
Change-Id: I17b05a5bad3fbb035d8f817145ce56be5e6ff2e8
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=472116
6 files changed, 135 insertions, 116 deletions
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp index 2582bb264..a2fb690ec 100644 --- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp +++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp @@ -26,50 +26,53 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug bugzilla::site { "bugzilla-4.0.18": major => "4", minor => "0", + micro => "18", } bugzilla::site { "bugzilla-4.2.14": major => "4", minor => "2", + micro => "14", } - bugzilla::site { "bugzilla-4.2.14-bugaliases": + bugzilla::site { "bugzilla-4.4.9-bugaliases": major => "4", - minor => "2", - branchTag => "bugzilla-4.2.14", + minor => "4", + micro => "9", usebugaliases => true, } bugzilla::site { "bugzilla-4.4.9": major => "4", minor => "4", + micro => "9", envdefault => true, } bugzilla::site { "bugzilla-4.4.9-custom-wf": major => "4", minor => "4", - branchTag => "bugzilla-4.4.9", + micro => "9", custom_wf => true, } bugzilla::site { "bugzilla-4.4.9-custom-wf-and-status": major => "4", minor => "4", - branchTag => "bugzilla-4.4.9", + micro => "9", custom_wf_and_status => true, } - bugzilla::site { "bugzilla-5.0rc3": + bugzilla::site { "bugzilla-5.0": major => "5", minor => "0", - branch => "5.0", - envversion => "5.0rc3", + micro => "", } bugzilla::site { "bugzilla-master": major => "5", minor => "1", + micro => "", branch => "master", branchTag => "HEAD", envversion => "5.1", @@ -83,12 +86,11 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug bugzilla::site { "bugzilla-rest-5.0-head": major => "5", minor => "0", + micro => "", branch => "5.0", - branchTag => "HEAD", envtype => "bugzillaREST", rest_enabled => true, envdefault_rest => true, - envversion => "5.0rc3+", testdataVersion => "Version1", } @@ -96,6 +98,7 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug bugzilla::site { "bugzilla-rest-master": major => "5", minor => "1", + micro => "", branch => "master", branchTag => "HEAD", envversion => "5.1", diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp index 16263838d..3cb1b09de 100644 --- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp +++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp @@ -12,13 +12,14 @@ define bugzilla::site ( $major, $minor, + $micro, $branch = "${major}.${minor}", $bugz_dbname = regsubst($title, '([^.-]+)([.-]+)', '\1_', 'G'), $bugz_user = $bugzilla::dbuser, $bugz_password = $bugzilla::dbuserPassword, $www_url = "$title", - $version = "$title", - $branchTag = "$title", + $bugzillaDir = "$title", + $branchTag = "", $custom_wf = false, $custom_wf_and_status = false, $xmlrpc_enabled = true, @@ -27,7 +28,7 @@ define bugzilla::site ( $envid = "$title", $userOwner = $bugzilla::userOwner, $userGroup = $bugzilla::userGroup, - $envversion = "${major}.${minor}", + $envversion = "${major}.${minor}.${micro}", $envdefault = false, $envdefault_rest = false, $desciptorfile = " ", @@ -41,7 +42,15 @@ define bugzilla::site ( include "bugzilla" $propertyanz = 0 $confDir = "$base/conf.d" - + if ($branchTag !="") { + $branchTagInternal = $branchTag + } else { + if ($micro !="") { + $branchTagInternal = "release-${major}.${minor}.${micro}" + } else { + $branchTagInternal = "release-${major}.${minor}" + } + } if $custom_wf { $envinfo1 = "Custom Workflow" } elsif $custom_wf_and_status { @@ -80,104 +89,104 @@ define bugzilla::site ( } if $branch == "master" { - if $branchTag == "HEAD" { - exec { "master master git fetch $version": + if $branchTagInternal == "HEAD" { + exec { "master master git fetch $bugzillaDir": command => "git fetch", - onlyif => "/usr/bin/test -d $base/$version", - cwd => "$base/$version", + onlyif => "/usr/bin/test -d $base/$bugzillaDir", + cwd => "$base/$bugzillaDir", user => "$userOwner", timeout => 300, logoutput => true, require => Exec["prepare bugzilla"], - notify => Exec["end extract bugzilla $version"], + notify => Exec["end extract bugzilla $bugzillaDir"], } - exec { "master master git clone $version": - command => "git clone http://git.mozilla.org/bugzilla/bugzilla $base/$version", + exec { "master master git clone $bugzillaDir": + command => "git clone http://git.mozilla.org/bugzilla/bugzilla $base/$bugzillaDir", cwd => "$base", user => "$userOwner", timeout => 300, - creates => "$base/$version", + creates => "$base/$bugzillaDir", require => Exec["prepare bugzilla"], - notify => Exec["end extract bugzilla $version"], + notify => Exec["end extract bugzilla $bugzillaDir"], } } else { - exec { "master $branchTag git clone $version": - command => "git clone -b $branch http://git.mozilla.org/bugzilla/bugzilla $base/$version", + exec { "master $branchTagInternal git clone $bugzillaDir": + command => "git clone -b $branch http://git.mozilla.org/bugzilla/bugzilla $base/$bugzillaDir", cwd => "$base", user => "$userOwner", timeout => 300, - creates => "$base/$version", + creates => "$base/$bugzillaDir", require => Exec["prepare bugzilla"], } - exec { "master $branchTag git checkout $version": - command => "git checkout $branchTag", - cwd => "$base/$version", + exec { "master $branchTagInternal git checkout $bugzillaDir": + command => "git checkout $branchTagInternal", + cwd => "$base/$bugzillaDir", user => "$userOwner", logoutput => true, timeout => 300, - require => Exec["master $branchTag git clone $version"], - notify => Exec["end extract bugzilla $version"], + require => Exec["master $branchTagInternal git clone $bugzillaDir"], + notify => Exec["end extract bugzilla $bugzillaDir"], } } } else { - exec { "$branch $branchTag git fetch $version": + exec { "$branch $branchTagInternal git fetch $bugzillaDir": command => "git fetch", - onlyif => "/usr/bin/test -d $base/$version", - cwd => "$base/$version", + onlyif => "/usr/bin/test -d $base/$bugzillaDir", + cwd => "$base/$bugzillaDir", user => "$userOwner", timeout => 300, logoutput => true, require => Exec["prepare bugzilla"], - notify => Exec["end extract bugzilla $version"], + notify => Exec["end extract bugzilla $bugzillaDir"], } - exec { "$branch $branchTag git clone $version": - command => "git clone -b $branch http://git.mozilla.org/bugzilla/bugzilla $base/$version", + exec { "$branch $branchTagInternal git clone $bugzillaDir": + command => "git clone -b $branch http://git.mozilla.org/bugzilla/bugzilla $base/$bugzillaDir", cwd => "$base", user => "$userOwner", timeout => 300, - creates => "$base/$version", + creates => "$base/$bugzillaDir", require => Exec["prepare bugzilla"], } - if $branchTag == "HEAD" { - exec { "$branch $branchTag dummy git checkout $version": - command => "echo '$branch $branchTag dummy git checkout $version'", + if $branchTagInternal == "HEAD" { + exec { "$branch $branchTagInternal dummy git checkout $bugzillaDir": + command => "echo '$branch $branchTagInternal dummy git checkout $bugzillaDir'", logoutput => true, - require => Exec["$branch $branchTag git clone $version"], - notify => Exec["end extract bugzilla $version"], + require => Exec["$branch $branchTagInternal git clone $bugzillaDir"], + notify => Exec["end extract bugzilla $bugzillaDir"], } } else { - exec { "$branch $branchTag git checkout $version": - command => "git checkout $branchTag", - cwd => "$base/$version", + exec { "$branch $branchTagInternal git checkout $bugzillaDir": + command => "git checkout $branchTagInternal", + cwd => "$base/$bugzillaDir", user => "$userOwner", timeout => 300, - require => Exec["$branch $branchTag git clone $version"], - notify => Exec["end extract bugzilla $version"], + require => Exec["$branch $branchTagInternal git clone $bugzillaDir"], + notify => Exec["end extract bugzilla $bugzillaDir"], } } } - exec { "end extract bugzilla $version": - command => "echo 'end extract bugzilla $version $branch $branchTag'", + exec { "end extract bugzilla $bugzillaDir": + command => "echo 'end extract bugzilla $bugzillaDir $branch $branchTagInternal'", logoutput => true, } - file { "$base/$version/installPerlModules.sh": + file { "$base/$bugzillaDir/installPerlModules.sh": content => template('bugzilla/installPerlModules.sh.erb'), owner => "$userOwner", group => "$userGroup", mode => 0755, - require => Exec["end extract bugzilla $version"], + require => Exec["end extract bugzilla $bugzillaDir"], } - exec { "post extract bugzilla $version": - command => "$base/$version/installPerlModules.sh >$base/$version/CGI.out", - cwd => "$base/$version", - creates => "$base/$version/CGI.out", + exec { "post extract bugzilla $bugzillaDir": + command => "$base/$bugzillaDir/installPerlModules.sh >$base/$bugzillaDir/CGI.out", + cwd => "$base/$bugzillaDir", + creates => "$base/$bugzillaDir/CGI.out", user => "$userOwner", - timeout => 3000, - require => File["$base/$version/installPerlModules.sh"] + timeout => 300, + require => File["$base/$bugzillaDir/installPerlModules.sh"] } exec { "mysql-grant-${bugz_dbname}-${bugzilla::dbuser}": @@ -185,45 +194,45 @@ define bugzilla::site ( "/usr/bin/mysql --user=root --batch -e \"SELECT user FROM db WHERE Host='localhost' and Db='${bugz_dbname}' and User='${bugzilla::dbuser}'\" mysql | /bin/grep '${bugzilla::dbuser}'", command => "/usr/bin/mysql --verbose --user=root -e \"GRANT ALL ON ${bugz_dbname}.* TO '${bugzilla::dbuser}'@localhost\" \ ; /usr/bin/mysqladmin --verbose --user=root flush-privileges", - require => Exec["post extract bugzilla $version"] + require => Exec["post extract bugzilla $bugzillaDir"] } if $clearMode == "clear" { - exec { "mysql-dropdb-$version": + exec { "mysql-dropdb-$bugzillaDir": onlyif => "/usr/bin/mysql --user=root '${bugz_dbname}'", command => "/usr/bin/mysqladmin -v --user=root --force drop '${bugz_dbname}'", require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"] } - exec { "mysql-createdb-$version": + exec { "mysql-createdb-$bugzillaDir": unless => "/usr/bin/mysql --user=root '${bugz_dbname}'", command => "/usr/bin/mysqladmin -v --user=root --force create '${bugz_dbname}'", - require => Exec["mysql-dropdb-$version"] + require => Exec["mysql-dropdb-$bugzillaDir"] } } else { - exec { "mysql-createdb-$version": + exec { "mysql-createdb-$bugzillaDir": unless => "/usr/bin/mysql --user=root '${bugz_dbname}'", command => "/usr/bin/mysqladmin -v --user=root --force create '${bugz_dbname}'", require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"] } } - file { "$base/$version/callchecksetup.pl": + file { "$base/$bugzillaDir/callchecksetup.pl": content => template('bugzilla/callchecksetup.pl.erb'), owner => "$userOwner", group => "$userGroup", mode => 0755, - require => Exec["post extract bugzilla $version"], + require => Exec["post extract bugzilla $bugzillaDir"], } - file { "$base/$version/answers": + file { "$base/$bugzillaDir/answers": content => template('bugzilla/answers.erb'), owner => "$userOwner", group => "$userGroup", - require => Exec["post extract bugzilla $version"], + require => Exec["post extract bugzilla $bugzillaDir"], } - file { "$base/$version/extensions/Mylyn": + file { "$base/$bugzillaDir/extensions/Mylyn": ensure => directory, # so make this a directory recurse => true, # enable recursive directory management purge => true, # purge all unmanaged junk @@ -231,70 +240,70 @@ define bugzilla::site ( owner => "$userOwner", group => "$userGroup", source => "puppet:///modules/bugzilla/extensions/Mylyn", - require => Exec["post extract bugzilla $version"], + require => Exec["post extract bugzilla $bugzillaDir"], } - file { "$base/$version/extensions/Mylyn/Extension.pm": + file { "$base/$bugzillaDir/extensions/Mylyn/Extension.pm": content => template('bugzilla/Extension.pm.erb'), - require => File["$base/$version/extensions/Mylyn"], + require => File["$base/$bugzillaDir/extensions/Mylyn"], owner => "$userOwner", group => "$userGroup", mode => 0644, } - exec { "init bugzilla_checksetup $version": - command => "$base/$version/callchecksetup.pl", - cwd => "$base/$version", - creates => "$base/$version/localconfig", + exec { "init bugzilla_checksetup $bugzillaDir": + command => "$base/$bugzillaDir/callchecksetup.pl", + cwd => "$base/$bugzillaDir", + creates => "$base/$bugzillaDir/localconfig", user => "$userOwner", logoutput => true, require => [ - Exec["mysql-createdb-$version"], - File["$base/$version/answers"], - File["$base/$version/callchecksetup.pl"], - File["$base/$version/extensions/Mylyn/Extension.pm"]] + Exec["mysql-createdb-$bugzillaDir"], + File["$base/$bugzillaDir/answers"], + File["$base/$bugzillaDir/callchecksetup.pl"], + File["$base/$bugzillaDir/extensions/Mylyn/Extension.pm"]] } - exec { "update bugzilla_checksetup $version": - command => "$base/$version/callchecksetup.pl", - cwd => "$base/$version", + exec { "update bugzilla_checksetup $bugzillaDir": + command => "$base/$bugzillaDir/callchecksetup.pl", + cwd => "$base/$bugzillaDir", logoutput => true, user => "$userOwner", require => [ - Exec["mysql-createdb-$version"], - Exec["init bugzilla_checksetup $version"], - File["$base/$version/answers"], - File["$base/$version/extensions/Mylyn/Extension.pm"], + Exec["mysql-createdb-$bugzillaDir"], + Exec["init bugzilla_checksetup $bugzillaDir"], + File["$base/$bugzillaDir/answers"], + File["$base/$bugzillaDir/extensions/Mylyn/Extension.pm"], ] } if !$xmlrpc_enabled { - file { "$base/$version/xmlrpc.cgi": + file { "$base/$bugzillaDir/xmlrpc.cgi": content => template('bugzilla/xmlrpc.cgi.erb'), owner => "$userOwner", group => "$userGroup", mode => 755, - require => Exec["update bugzilla_checksetup $version"], + require => Exec["update bugzilla_checksetup $bugzillaDir"], } } - file { "$base/$version/service.json": + file { "$base/$bugzillaDir/service.json": content => template('bugzilla/service.json.erb'), owner => "$userOwner", group => "$userGroup", mode => 644, - require => Exec["update bugzilla_checksetup $version"], + require => Exec["update bugzilla_checksetup $bugzillaDir"], } - file { "$confDir/$version.conf": + file { "$confDir/$bugzillaDir.conf": content => template('bugzilla/apache2.conf.erb'), - require => [Package["apache2"], Exec["update bugzilla_checksetup $version"]], + require => [Package["apache2"], Exec["update bugzilla_checksetup $bugzillaDir"]], notify => Service["apache2"], } - exec { "add $version to /etc/apache2/conf-enabled/bugzilla.conf": + exec { "add $bugzillaDir to /etc/apache2/conf-enabled/bugzilla.conf": command => "echo 'Include $base/conf.d/[^.#]*\n' >> /etc/apache2/conf-enabled/bugzilla.conf", - require => File["$confDir/$version.conf"], + require => File["$confDir/$bugzillaDir.conf"], notify => Service["apache2"], onlyif => "grep -qe '^Include $base/conf.d' /etc/apache2/conf-enabled/bugzilla.conf; test $? != 0" } diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/apache2.conf.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/apache2.conf.erb index 6c88a1332..be2cce3fc 100644 --- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/apache2.conf.erb +++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/apache2.conf.erb @@ -1,5 +1,5 @@ -Alias /<%= @www_url %> <%= @base %>/<%= @version %> -<Directory <%= @base %>/<%= @version %>> +Alias /<%= @www_url %> <%= @base %>/<%= @bugzillaDir %> +<Directory <%= @base %>/<%= @bugzillaDir %>> AddHandler cgi-script .cgi Options +Indexes +ExecCGI DirectoryIndex index.cgi diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb index 5961c051a..3b5a83021 100644 --- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb +++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb @@ -1,4 +1,7 @@ #!/bin/bash +<% if @envversion < "5.0" %> +grep -v /mirror.hiwaay.net Bugzilla/Install/CPAN.pm >Bugzilla/Install/CPAN.tmp; mv -f Bugzilla/Install/CPAN.tmp Bugzilla/Install/CPAN.pm +<% end %> echo "start: $(date +'%d/%m/%Y %H:%M:%S:%3N')" /usr/bin/perl install-module.pl Text::Wrap <% if @envversion > "4.5" %> @@ -10,7 +13,7 @@ echo "start3: $(date +'%d/%m/%Y %H:%M:%S:%3N')" /usr/bin/perl install-module.pl Moo echo "ende3: $(date +'%d/%m/%Y %H:%M:%S:%3N')" <% end %> -<% if @envversion < "4.1" %> +<% if @envversion < "5.0" %> echo "start4: $(date +'%d/%m/%Y %H:%M:%S:%3N')" /usr/bin/perl install-module.pl DBI echo "ende4: $(date +'%d/%m/%Y %H:%M:%S:%3N')" diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaClientTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaClientTest.java index a6344e9c9..d6222e53b 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaClientTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaClientTest.java @@ -58,13 +58,13 @@ public class BugzillaClientTest extends AbstractBugzillaTest { } RepositoryConfiguration config = client.getRepositoryConfiguration(); assertNotNull(config); - assertEquals( - 0, - config.getInstallVersion().compareMajorMinorOnly( - new BugzillaVersion(BugzillaFixture.current().getVersion()))); + assertEquals(0, config.getInstallVersion() + .compareMajorMinorOnly(new BugzillaVersion(BugzillaFixture.current().getVersion()))); if (BugzillaFixture.current().isCustomWorkflowAndStatus()) { - assertEquals(10, config.getOptionValues(BugzillaAttribute.BUG_STATUS).size()); - } else if (BugzillaFixture.current().getBugzillaVersion().compareMajorMinorOnly(BugzillaVersion.BUGZILLA_4_0) < 0) { + assertEquals(8, config.getOptionValues(BugzillaAttribute.BUG_STATUS).size()); + } else if (BugzillaFixture.current() + .getBugzillaVersion() + .compareMajorMinorOnly(BugzillaVersion.BUGZILLA_4_0) < 0) { assertEquals(7, config.getOptionValues(BugzillaAttribute.BUG_STATUS).size()); } else { assertEquals(5, config.getOptionValues(BugzillaAttribute.BUG_STATUS).size()); @@ -75,8 +75,8 @@ public class BugzillaClientTest extends AbstractBugzillaTest { assertEquals(36, config.getOptionValues(BugzillaAttribute.OP_SYS).size()); assertEquals(5, config.getOptionValues(BugzillaAttribute.PRIORITY).size()); } else { - if (BugzillaVersion.BUGZILLA_4_0.compareMajorMinorOnly(new BugzillaVersion(BugzillaFixture.current() - .getVersion())) > 0) { + if (BugzillaVersion.BUGZILLA_4_0 + .compareMajorMinorOnly(new BugzillaVersion(BugzillaFixture.current().getVersion())) > 0) { assertEquals(6, config.getOptionValues(BugzillaAttribute.RESOLUTION).size()); } else { assertEquals(5, config.getOptionValues(BugzillaAttribute.RESOLUTION).size()); @@ -88,9 +88,11 @@ public class BugzillaClientTest extends AbstractBugzillaTest { assertEquals(7, config.getOptionValues(BugzillaAttribute.BUG_SEVERITY).size()); assertEquals(3, config.getOptionValues(BugzillaAttribute.PRODUCT).size()); if (BugzillaFixture.current().isCustomWorkflowAndStatus()) { - assertEquals(6, config.getOpenStatusValues().size()); - assertEquals(1, config.getClosedStatusValues().size()); - } else if (BugzillaFixture.current().getBugzillaVersion().compareMajorMinorOnly(BugzillaVersion.BUGZILLA_4_0) < 0) { + assertEquals(5, config.getOpenStatusValues().size()); + assertEquals(3, config.getClosedStatusValues().size()); + } else if (BugzillaFixture.current() + .getBugzillaVersion() + .compareMajorMinorOnly(BugzillaVersion.BUGZILLA_4_0) < 0) { assertEquals(4, config.getOpenStatusValues().size()); assertEquals(3, config.getClosedStatusValues().size()); } else { @@ -106,7 +108,8 @@ public class BugzillaClientTest extends AbstractBugzillaTest { assertEquals(1, config.getProductOptionValues(BugzillaAttribute.TARGET_MILESTONE, "TestProduct").size()); assertEquals(2, config.getProductOptionValues(BugzillaAttribute.COMPONENT, "Product with Spaces").size()); assertEquals(4, config.getProductOptionValues(BugzillaAttribute.VERSION, "Product with Spaces").size()); - assertEquals(4, config.getProductOptionValues(BugzillaAttribute.TARGET_MILESTONE, "Product with Spaces").size()); + assertEquals(4, + config.getProductOptionValues(BugzillaAttribute.TARGET_MILESTONE, "Product with Spaces").size()); } public void testValidate() throws Exception { @@ -144,7 +147,8 @@ public class BugzillaClientTest extends AbstractBugzillaTest { TaskRepository repository = BugzillaFixture.current().repository(); AuthenticationCredentials anonymousCreds = new AuthenticationCredentials("", ""); repository.setCredentials(AuthenticationType.REPOSITORY, anonymousCreds, false); - repository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials("YYYYYYYY", "XXXXXXXX"), false); + repository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials("YYYYYYYY", "XXXXXXXX"), + false); TaskRepositoryLocation location = new TaskRepositoryLocation(repository); client = new BugzillaClient(location, repository, BugzillaFixture.current().connector()); @@ -166,7 +170,8 @@ public class BugzillaClientTest extends AbstractBugzillaTest { public void testValidateUserPlusHTTP() throws Exception { TaskRepository repository = BugzillaFixture.current().repository(); - repository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials("YYYYYYYY", "XXXXXXXX"), false); + repository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials("YYYYYYYY", "XXXXXXXX"), + false); TaskRepositoryLocation location = new TaskRepositoryLocation(repository); client = new BugzillaClient(location, repository, BugzillaFixture.current().connector()); @@ -182,8 +187,8 @@ public class BugzillaClientTest extends AbstractBugzillaTest { public void testCommentQuery() throws Exception { BugzillaRepositoryConnector connector = BugzillaFixture.current().connector(); BugzillaAttributeMapper mapper = new BugzillaAttributeMapper(repository, connector); - TaskData newData = new TaskData(mapper, BugzillaFixture.current().getConnectorKind(), BugzillaFixture.current() - .getRepositoryUrl(), ""); + TaskData newData = new TaskData(mapper, BugzillaFixture.current().getConnectorKind(), + BugzillaFixture.current().getRepositoryUrl(), ""); assertTrue(connector.getTaskDataHandler().initializeTaskData(repository, newData, null, new NullProgressMonitor())); @@ -231,8 +236,7 @@ public class BugzillaClientTest extends AbstractBugzillaTest { IRepositoryQuery query = new RepositoryQuery(BugzillaFixture.current().getConnectorKind(), "query"); UrlBuilder urlBuilder = UrlBuilder.build(BugzillaFixture.current().repository()).append("/buglist.cgi"); - urlBuilder.parameter( - "short_desc=test%20EnhanceSearch&columnlist", + urlBuilder.parameter("short_desc=test%20EnhanceSearch&columnlist", "bug_severity,priority,assigned_to,bug_status,resolution,short_desc,changeddate,reporter,assigned_to_realname,reporter_realname,product,component"); query.setUrl(urlBuilder.toString()); diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaHarness.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaHarness.java index d74823ac8..1edcd306e 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaHarness.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/support/BugzillaHarness.java @@ -375,7 +375,7 @@ public class BugzillaHarness { TaskAttachmentMapper attachmentMapper = TaskAttachmentMapper.createFrom(attrAttachment); String fileName = "test-attach-1.txt"; - File attachFile = new File(fileName); + File attachFile = File.createTempFile("test-attach", null); attachFile.createNewFile(); attachFile.deleteOnExit(); BufferedWriter write = new BufferedWriter(new FileWriter(attachFile)); |