Skip to content
Browse files

Merge pull request #712 from sonatype/run-as-junit-test

Replaced testng with junit4
  • Loading branch information...
2 parents 029c2ca + 63c6931 commit 175c22250f37ca9febc2a5acf2fbda36929da353 @ifedorenko ifedorenko committed
Showing with 1,737 additions and 1,673 deletions.
  1. +7 −0 nexus-test/nexus-test-common/pom.xml
  2. +0 −5 nexus-test/nexus-test-harness-its/pom.xml
  3. +25 −25 ...rc/test/java/org/sonatype/nexus/integrationtests/client/nexus725/Nexus725InitialRestClientIT.java
  4. +4 −5 .../org/sonatype/nexus/integrationtests/nexus1022/Nexus1022RebuildRepositoryMavenMetadataTaskIT.java
  5. +10 −9 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1071/Nexus1071AnonAccessIT.java
  6. +11 −11 ...t/java/org/sonatype/nexus/integrationtests/nexus1071/Nexus1071DeployToRepoAnonCannotAccessIT.java
  7. +4 −4 .../test/java/org/sonatype/nexus/integrationtests/nexus1170/Nexus1170ReducePermissionCheckingIT.java
  8. +6 −5 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1197/Nexus1197CheckUserAgentIT.java
  9. +27 −27 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus1239/Nexus1239PlexusUserResourceIT.java
  10. +11 −11 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1239/Nexus1239UserSearchIT.java
  11. +15 −14 .../src/test/java/org/sonatype/nexus/integrationtests/nexus1239/Nexus1239UserSearchPermissionIT.java
  12. +6 −6 ...src/test/java/org/sonatype/nexus/integrationtests/nexus1240/Nexus1240SourceInLoginResourceIT.java
  13. +3 −3 ...-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1286/Nexus1286RoleListIT.java
  14. +11 −11 .../src/test/java/org/sonatype/nexus/integrationtests/nexus1328/Nexus1328RepositoryMirrorRestIT.java
  15. +4 −4 ...est-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/AbstractMirrorIT.java
  16. +4 −4 .../test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329AbstractCheckOnlyOneMirror.java
  17. +5 −5 ...-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329ChecksumIT.java
  18. +7 −7 .../src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329MirrorFailAndRetriesIT.java
  19. +7 −7 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329MirrorFailNoRetiesIT.java
  20. +4 −4 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329MirrorOnlyIT.java
  21. +6 −6 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329RetryMirrorIT.java
  22. +6 −6 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329UnavailableIT.java
  23. +12 −6 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetCrudJsonIT.java
  24. +9 −7 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetCrudXmlIT.java
  25. +27 −27 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetPermissionIT.java
  26. +32 −27 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetValidationIT.java
  27. +16 −14 ...harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1375/Nexus1375LogConfigIT.java
  28. +7 −7 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus142/Nexus142UserCrudJsonIT.java
  29. +1 −1 ...harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus142/Nexus142UserCrudXmlIT.java
  30. +28 −28 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus142/Nexus142UserPermissionIT.java
  31. +21 −14 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus142/Nexus142UserValidationIT.java
  32. +5 −5 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1506/Nexus1506NonProxyHostIT.java
  33. +18 −12 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus156/Nexus156RolesCrudJsonIT.java
  34. +13 −6 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus156/Nexus156RolesCrudXmlIT.java
  35. +27 −27 ...ess-its/src/test/java/org/sonatype/nexus/integrationtests/nexus156/Nexus156RolesPermissionIT.java
  36. +27 −24 ...ess-its/src/test/java/org/sonatype/nexus/integrationtests/nexus156/Nexus156RolesValidationIT.java
  37. +2 −2 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1560/AbstractLegacyRulesIT.java
  38. +5 −5 ...src/test/java/org/sonatype/nexus/integrationtests/nexus1560/Nexus1560LegacyAllowGroupRulesIT.java
  39. +8 −8 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1560/Nexus1560LegacyAllowRulesIT.java
  40. +3 −3 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1560/Nexus1560LegacyDenyRulesIT.java
  41. +11 −11 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1563/Nexus1563ExternalRealmsIT.java
  42. +4 −4 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus1563/Nexus1563ExternalRealmsLoginIT.java
  43. +13 −13 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1581/Nexus1581MirrorMetadataIT.java
  44. +4 −4 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1581/Nexus1581RemoteMetadataIT.java
  45. +4 −4 ...ess-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1599/Nexus1599ViewPrivilegeIT.java
  46. +25 −25 .../src/test/java/org/sonatype/nexus/integrationtests/nexus1633/Nexus1633HostedMirrorMetadataIT.java
  47. +15 −15 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1646/Nexus1646DeployArtifactsIT.java
  48. +4 −5 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus1650/Nexus1650MultipleManualTaskIT.java
  49. +5 −5 ...-test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus166/JettyMemoryLeak.java
  50. +3 −3 ...test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus166/Nexus166SampleIT.java
  51. +2 −2 ...us-test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus166/StartStopLeak.java
  52. +6 −6 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus167/Nexus167ReleaseToSnapshotIT.java
  53. +6 −6 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus168/Nexus168SnapshotToReleaseIT.java
  54. +10 −10 ...st/java/org/sonatype/nexus/integrationtests/nexus169/Nexus169ReleaseMetaDataInSnapshotRepoIT.java
  55. +38 −38 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1696/Nexus1696ValidateBaseUrlIT.java
  56. +3 −3 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus1719/Nexus1719OOSRepoEvictUnusedTaskIT.java
  57. +4 −4 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1730/Nexus1730DeleteRepoIT.java
  58. +8 −8 .../test/java/org/sonatype/nexus/integrationtests/nexus174/Nexus174ReleaseDeployWrongPasswordIT.java
  59. +8 −8 ...test/java/org/sonatype/nexus/integrationtests/nexus175/Nexus175SnapshotDeployWrongPasswordIT.java
  60. +10 −10 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus176/Nexus176DeployToInvalidRepoIT.java
  61. +13 −13 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1765/Nexus1765RepositoryFilterIT.java
  62. +6 −5 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus1765/Nexus1765RepositoryServicesIT.java
  63. +10 −10 ...test/java/org/sonatype/nexus/integrationtests/nexus1806/Nexus1806ValidateSmtpConfigurationIT.java
  64. +3 −3 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus1883/Nexus1883OOSRepoExpireTaskIT.java
  65. +8 −8 ...st-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1923/AbstractNexus1923.java
  66. +5 −5 ...src/test/java/org/sonatype/nexus/integrationtests/nexus1923/Nexus1923GroupIncrementalIndexIT.java
  67. +5 −5 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus1923/Nexus1923HostedIncrementalIndexIT.java
  68. +2 −2 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus1923/Nexus1923ProxyIncrementalDeleteIT.java
  69. +5 −5 ...src/test/java/org/sonatype/nexus/integrationtests/nexus1923/Nexus1923ProxyIncrementalIndexIT.java
  70. +5 −5 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1954/AbstractDeleteArtifactsIT.java
  71. +3 −3 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1961/Nexus1961IndexContentIT.java
  72. +2 −2 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2062/Nexus2062EmptyGroupIT.java
  73. +12 −12 ...test/java/org/sonatype/nexus/integrationtests/nexus2120/Nexus2120EnableDownloadRemoteIndexIT.java
  74. +6 −5 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2138/Nexus2138RouteFilteringIT.java
  75. +10 −10 .../test/java/org/sonatype/nexus/integrationtests/nexus2178/Nexus2178ErrorReportingConfigRestIT.java
  76. +4 −4 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus2213/Nexus2213ErrorReportBundleIT.java
  77. +6 −6 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus2302/Nexus2302DeployEncodedFileIT.java
  78. +2 −2 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus2327/Nexus2327RepositoryIdValidationIT.java
  79. +19 −19 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus233/Nexus233PrivilegePermissionIT.java
  80. +90 −83 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus233/Nexus233PrivilegesCrudXMLIT.java
  81. +12 −5 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus233/Nexus233PrivilegesValidationIT.java
  82. +5 −6 ...src/test/java/org/sonatype/nexus/integrationtests/nexus2351/Nexus2351DisableRedeployMaven1IT.java
  83. +5 −6 ...src/test/java/org/sonatype/nexus/integrationtests/nexus2351/Nexus2351DisableRedeployMaven2IT.java
  84. +13 −13 ...src/test/java/org/sonatype/nexus/integrationtests/nexus2351/Nexus2351DisableRedeployUploadIT.java
  85. +3 −3 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus2379/Nexus2379MultipleErrorReportIT.java
  86. +2 −2 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2490/Nexus2490LvoConfigCheckIT.java
  87. +6 −5 .../src/test/java/org/sonatype/nexus/integrationtests/nexus2497/Nexus2497ConcurrentRepoAccessIT.java
  88. +6 −6 .../test/java/org/sonatype/nexus/integrationtests/nexus2556/Nexus2556BrandNewRepositorySearchIT.java
  89. +5 −5 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus258/Nexus258ReleaseDeployIT.java
  90. +6 −6 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus259/Nexus259SnapshotDeployIT.java
  91. +5 −5 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus260/Nexus260MultipleDeployIT.java
  92. +5 −5 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus261/Nexus261NexusGroupDownloadIT.java
  93. +6 −6 ...ess-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2641/Nexus2641RestApiConfigIT.java
  94. +7 −7 ...-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2692/AbstractEvictTaskIt.java
  95. +6 −6 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2692/Nexus2692EvictAllTaskIT.java
  96. +6 −6 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2692/Nexus2692EvictGroupTaskIT.java
  97. +4 −4 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus2692/Nexus2692EvictHostedReleaseTaskIT.java
  98. +4 −4 ...c/test/java/org/sonatype/nexus/integrationtests/nexus2692/Nexus2692EvictHostedSnapshotTaskIT.java
  99. +18 −18 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus2797/Nexus2797Validate140TaskUpgradeIT.java
  100. +3 −3 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus2860/Nexus2860SMTPPasswordUpgradeIT.java
  101. +6 −6 ...-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2862/Nexus2862UrlRealmIT.java
  102. +3 −3 .../test/java/org/sonatype/nexus/integrationtests/nexus2923/Nexus2923SearchResultDownloadLinkIT.java
  103. +7 −7 ...t/java/org/sonatype/nexus/integrationtests/nexus2991/Nexus2991DeleteRepositoryBeforeSearchIT.java
  104. +3 −3 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus2996/Nexus2996DeleteRepoTargetIT.java
  105. +6 −5 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3011/Nexus3011DeletePrivilegeIT.java
  106. +2 −2 ...harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3039/Nexus3039IndexTreeIT.java
  107. +2 −2 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3045/Nexus3045GroupRemovalIT.java
  108. +8 −7 ...src/test/java/org/sonatype/nexus/integrationtests/nexus3082/Nexus3082GenerateProblemReportIT.java
  109. +2 −2 ...test/java/org/sonatype/nexus/integrationtests/nexus3162/Nexus3162SnapshotProxyRepoTemplateIT.java
  110. +11 −11 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3233/Nexus3233IndexPomSha1IT.java
  111. +1 −1 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3257/Nexus3257ModifyRepoTargetIT.java
  112. +1 −9 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3427/Nexus3427GlobalSettingsIT.java
  113. +3 −3 ...ava/org/sonatype/nexus/integrationtests/nexus3546/Nexus3546ValidateTransitivePrivsOnGroupsIT.java
  114. +5 −5 ...c/test/java/org/sonatype/nexus/integrationtests/nexus3567/Nexus3567GroupMemberChangesIndexIT.java
  115. +7 −7 .../src/test/java/org/sonatype/nexus/integrationtests/nexus3615/Nexus3615ArtifactInfoProviderIT.java
  116. +11 −4 .../src/test/java/org/sonatype/nexus/integrationtests/nexus3615/Nexus3615ArtifactInfoSecurityIT.java
  117. +12 −12 ...harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3615/Nexus3615MavenInfoIT.java
  118. +12 −12 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3626/Nexus3626SimpleSearchIT.java
  119. +7 −7 ...c/test/java/org/sonatype/nexus/integrationtests/nexus3638/Nexus3638IndexProxiedMavenPluginIT.java
  120. +17 −16 ...ess-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3670/Nexus3670IndexTreeViewIT.java
  121. +2 −2 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus3709/Nexus3709FileTypeValidationIT.java
  122. +12 −6 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus379/Nexus379VirtualRepoSameIdIT.java
  123. +6 −6 ...test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus383/Nexus383SearchIT.java
  124. +13 −13 ...st-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus383/Nexus383SearchNGIT.java
  125. +4 −4 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus383/Nexus383SearchPermissionIT.java
  126. +7 −5 ...st/java/org/sonatype/nexus/integrationtests/nexus3832/Nexus3832GroupLocalOverRemoteContentIT.java
  127. +4 −4 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus384/Nexus384DotAndDashSearchIT.java
  128. +19 −18 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus385/Nexus385RoutesCrudXmlIT.java
  129. +27 −27 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus385/Nexus385RoutesPermissionIT.java
  130. +12 −5 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus385/Nexus385RoutesValidationIT.java
  131. +14 −14 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3854/NEXUS3854Maven3MetadataIT.java
  132. +55 −42 ...test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3860/AbstractCargoIT.java
  133. +15 −15 ...test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus387/Nexus387RoutesIT.java
  134. +4 −4 ...t/java/org/sonatype/nexus/integrationtests/nexus3882/Nexus3882IPAtAthenticationFailureFeedIT.java
  135. +7 −7 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus3929/Nexus3929TimelineCorruptionIT.java
  136. +4 −4 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus393/Nexus393ResetPasswordIT.java
  137. +6 −6 ...src/test/java/org/sonatype/nexus/integrationtests/nexus393/Nexus393ResetPasswordPermissionIT.java
  138. +6 −6 ...t/java/org/sonatype/nexus/integrationtests/nexus393/Nexus393ResetPasswordWithoutPermissionIT.java
  139. +4 −5 ...src/test/java/org/sonatype/nexus/integrationtests/nexus3936/Nexus3936DisableSecurityStatusIT.java
  140. +4 −4 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus394/Nexus394ForgotPasswordIT.java
  141. +6 −6 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus394/Nexus394ForgotPasswordPermissionIT.java
  142. +6 −6 .../java/org/sonatype/nexus/integrationtests/nexus394/Nexus394ForgotPasswordWithoutPermissionIT.java
  143. +3 −3 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus3947/Nexus3947ArchetypeCatalogIT.java
  144. +2 −2 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus395/AbstractForgotUserNameIT.java
  145. +2 −2 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus395/Nexus395ForgotUsernameIT.java
  146. +4 −4 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus395/Nexus395ForgotUsernamePermissionIT.java
  147. +8 −9 ...ype/nexus/integrationtests/nexus3996/Nexus3996ScheduledTasksTimezoneDifferentDayValidationIT.java
  148. +6 −10 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4038/Nexus4038DeleteSystemFeedIT.java
  149. +29 −13 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus4066/Nexus4066TaskMutualExclusionIT.java
  150. +2 −2 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus408/Nexus408ChangePasswordIT.java
  151. +9 −9 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus408/Nexus408ChangePasswordPermissionIT.java
  152. +1 −1 ...-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus412/Nexus412RemoteLeakIT.java
  153. +1 −1 ...-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4123/Nexus4123MappingsIT.java
  154. +9 −9 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus421/Nexus421PlainNotificationIT.java
  155. +6 −6 .../java/org/sonatype/nexus/integrationtests/nexus4218/Nexus4218MetadataModelVersionPerClientIT.java
  156. +8 −9 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus4257/Nexus4257CookieVerificationIT.java
  157. +6 −6 ...natype/nexus/integrationtests/nexus4268/Nexus4268NewPluginContributedRepositoryTypeRoutingIT.java
  158. +11 −12 ...src/test/java/org/sonatype/nexus/integrationtests/nexus429/Nexus429UploadArtifactPrivilegeIT.java
  159. +6 −6 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus429/Nexus429WagonDeployPrivilegeIT.java
  160. +3 −2 ...src/test/java/org/sonatype/nexus/integrationtests/nexus4301/Nexus4301WarnErrorLogsLoadTestIT.java
  161. +1 −2 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus4341/Nexus4341RunningTaskNotEditableIT.java
  162. +1 −1 .../sonatype/nexus/integrationtests/nexus4372/Nexus4372InvalidSearchStringYields400BadRequestIT.java
  163. +6 −6 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4383/Nexus4383LogoutResourceIT.java
  164. +2 −2 ...rg/sonatype/nexus/integrationtests/nexus4390/Nexus4390RepeatedConditionalGetsHaveToSucceedIT.java
  165. +1 −1 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus4423/Nexus4423Maven3SnapshotMetadataIT.java
  166. +3 −2 .../src/test/java/org/sonatype/nexus/integrationtests/nexus4427/Nexus4427WarnErrorLogsToFeedsIT.java
  167. +7 −7 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus448/Nexus448PrivilegeUrlIT.java
  168. +10 −10 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus450/Nexus450UserCreationIT.java
  169. +13 −24 .../org/sonatype/nexus/integrationtests/nexus4520/Nexus4520PlexusPrefixedVariablesArePickedUpIT.java
  170. +2 −11 ...onatype/nexus/integrationtests/nexus4529/Nexus4529HighlyConcurrentRepoAdditionsAndRemovalsIT.java
  171. +3 −3 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus4538/Nexus4538ConcurrentDownloadIT.java
  172. +7 −7 ...t-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4539/AutoBlockITSupport.java
  173. +1 −1 ...harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4539/NEXUS4539AutoBlockIT.java
  174. +3 −3 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4539/NEXUS4539ManualBlockIT.java
  175. +3 −3 ...g/sonatype/nexus/integrationtests/nexus4548/Nexus4548RepoTargetPermissionMatchesPathInRepoIT.java
  176. +5 −6 ...test/java/org/sonatype/nexus/integrationtests/nexus4579/Nexus4579OptionalTrashForSnapshotsIT.java
  177. +7 −7 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus4593/Nexus4593NoAutoblockFor403IT.java
  178. +1 −1 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4594/NEXUS4594Blocked2NFCIT.java
  179. +1 −1 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus4594/NEXUS4594ManualBlocked2NFCIT.java
  180. +5 −5 ...arness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4635/Nexus4635FirstStartIT.java
  181. +7 −6 ...st/java/org/sonatype/nexus/integrationtests/nexus4635nexusVersion/Nexus4635OldNexusVersionIT.java
  182. +4 −4 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus4635same/Nexus4635SubsequentStartIT.java
  183. +5 −5 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus4635upgrade/Nexus4635FullUpgradeIT.java
  184. +2 −3 .../sonatype/nexus/integrationtests/nexus4660/Nexus4660AttributeStorageFSLSTransitioningUpgrade.java
  185. +1 −2 ...ss-its/src/test/java/org/sonatype/nexus/integrationtests/nexus4674/Nexus4674UpdateGAVIndexIT.java
  186. +14 −14 ...rness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus477/Nexus477ArtifactsCrudIT.java
  187. +5 −6 .../test/java/org/sonatype/nexus/integrationtests/nexus4780/Nexus4780NonProxyHostsRemoteStorage.java
  188. +1 −1 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus4955/NEXUS4955UploadWOExtensionIT.java
  189. +1 −1 ...t/java/org/sonatype/nexus/integrationtests/nexus4970/Nexus4970InvalidMetadataMergeOnGroupsIT.java
  190. +7 −7 ...ness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus502/Nexus502MavenExecutionIT.java
  191. +1 −1 ...its/src/test/java/org/sonatype/nexus/integrationtests/nexus5023/Nexus5023NoSniffHttpHeaderIT.java
  192. +7 −6 ...va/org/sonatype/nexus/integrationtests/nexus5026/Nexus5026GenerateProblemReportViaWebProxyIT.java
  193. +8 −7 ...-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus504/Nexus504ChangeRoleIT.java
  194. +5 −5 ...harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus507/Nexus507UserTimeoutIT.java
  195. +5 −5 ...harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus511/Nexus511MavenDeployIT.java
  196. +1 −2 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus5125/Nexus5125RemoteIndexPage404IT.java
  197. +24 −24 ...-test-harness-its/src/test/java/org/sonatype/nexus/integrationtests/nexus526/Nexus526FeedsIT.java
  198. +13 −13 ...src/test/java/org/sonatype/nexus/integrationtests/nexus5291/Nexus5291OverloadResponseIs503IT.java
  199. +18 −26 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus531/Nexus531RepositoryCrudJsonIT.java
  200. +34 −34 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus531/Nexus531RepositoryCrudPermissionIT.java
  201. +40 −41 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus531/Nexus531RepositoryCrudValidationIT.java
  202. +3 −4 ...s-its/src/test/java/org/sonatype/nexus/integrationtests/nexus531/Nexus531RepositoryCrudXMLIT.java
Sorry, we could not display the entire diff because too many files (333) changed.
View
7 nexus-test/nexus-test-common/pom.xml
@@ -57,6 +57,13 @@
<version>1.7.1</version>
</dependency>
+ <!-- @PerfTest support; http://databene.org/contiperf.html -->
+ <dependency>
+ <groupId>org.databene</groupId>
+ <artifactId>contiperf</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>javax.servlet</artifactId>
View
5 nexus-test/nexus-test-harness-its/pom.xml
@@ -49,11 +49,6 @@
</dependency>
<dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-test-common</artifactId>
<scope>test</scope>
View
50 ...java/org/sonatype/nexus/integrationtests/client/nexus725/Nexus725InitialRestClientIT.java
@@ -16,6 +16,9 @@
import java.util.Iterator;
import java.util.List;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonatype.nexus.client.NexusClient;
@@ -31,9 +34,6 @@
import org.sonatype.nexus.rest.model.RepositoryBaseResource;
import org.sonatype.nexus.rest.model.RepositoryListResource;
import org.sonatype.nexus.rest.model.RepositoryResource;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
/**
* Tests the Nexus java/REST client.
@@ -57,7 +57,7 @@ private NexusClient getConnectedNexusClient()
}
@BeforeClass
- public void setSecureTest(){
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
@@ -68,7 +68,7 @@ public void getRepoListTest()
NexusClient client = this.getConnectedNexusClient();
List<RepositoryListResource> repos = client.getRepositories();
- Assert.assertTrue( repos.size() > 0, "Expected list of repos to be larger then 0" );
+ Assert.assertTrue( "Expected list of repos to be larger then 0", repos.size() > 0 );
List<String> knownRepos = new ArrayList<String>();
knownRepos.add( "fake-central" );
@@ -82,8 +82,8 @@ public void getRepoListTest()
for ( Iterator<RepositoryListResource> iter = repos.iterator(); iter.hasNext(); )
{
RepositoryListResource repositoryListResource = iter.next();
- Assert.assertTrue( knownRepos.contains( repositoryListResource.getId() ), "Expected to find repo: "
- + repositoryListResource.getId() + " in list: " + knownRepos );
+ Assert.assertTrue( "Expected to find repo: "
+ + repositoryListResource.getId() + " in list: " + knownRepos, knownRepos.contains( repositoryListResource.getId() ) );
}
client.disconnect();
}
@@ -94,11 +94,11 @@ public void isValidRepositoryTest()
{
NexusClient client = this.getConnectedNexusClient();
- Assert.assertTrue( client.isValidRepository( "nexus-test-harness-repo" ),
- "Expected to find 'apache-snapshots' repo:" );
- Assert.assertFalse( client.isValidRepository( "foobar" ), "Expected not to find 'foobar' repo:" );
+ Assert.assertTrue( "Expected to find 'apache-snapshots' repo:",
+ client.isValidRepository( "nexus-test-harness-repo" ) );
+ Assert.assertFalse( "Expected not to find 'foobar' repo:", client.isValidRepository( "foobar" ) );
- Assert.assertFalse( client.isValidRepository( null ), "Expected not to find 'null' repo:" );
+ Assert.assertFalse( "Expected not to find 'null' repo:", client.isValidRepository( null ) );
client.disconnect();
@@ -111,7 +111,7 @@ public void getRepoTest()
NexusClient client = this.getConnectedNexusClient();
RepositoryBaseResource repo = client.getRepository( "nexus-test-harness-repo" );
- Assert.assertEquals( "nexus-test-harness-repo", repo.getId() );
+ Assert.assertEquals( repo.getId(), "nexus-test-harness-repo" );
client.disconnect();
}
@@ -145,14 +145,14 @@ public void repoCrudTest()
RepositoryBaseResource repoResult = client.createRepository( repoResoruce );
RepositoryBaseResource repoExpected = client.getRepository( "testCreate" );
- Assert.assertEquals( repoResult.getId(), repoExpected.getId() );
- Assert.assertEquals( repoResult.getName(), repoExpected.getName() );
- Assert.assertEquals( repoResult.getFormat(), repoExpected.getFormat() );
+ Assert.assertEquals( repoExpected.getId(), repoResult.getId() );
+ Assert.assertEquals( repoExpected.getName(), repoResult.getName() );
+ Assert.assertEquals( repoExpected.getFormat(), repoResult.getFormat() );
// now update it
repoExpected.setName( "Updated Name" );
repoExpected = client.updateRepository( repoExpected );
- Assert.assertEquals( "Updated Name", repoExpected.getName() );
+ Assert.assertEquals( repoExpected.getName(), "Updated Name" );
// now delete it
client.deleteRepository( "testCreate" );
@@ -166,7 +166,7 @@ public void repoCrudTest()
{
// expected
}
- Assert.assertFalse( client.isValidRepository( "testCreate" ), "Expected false, repo should have been deleted." );
+ Assert.assertFalse( "Expected false, repo should have been deleted.", client.isValidRepository( "testCreate" ) );
client.disconnect();
}
@@ -209,12 +209,12 @@ public void searchByGAVTest()
searchParam.setClassifier( null );
List<NexusArtifact> results = client.searchByGAV( searchParam );
- Assert.assertEquals( results.size(), 1, "Search result size" );
+ Assert.assertEquals( "Search result size", results.size(), 1 );
- Assert.assertEquals( results.get( 0 ).getArtifactId(), "nexus725-artifact-1", "Search result artifact id" );
- Assert.assertEquals( results.get( 0 ).getGroupId(), "nexus725", "Search result group id" );
- Assert.assertEquals( results.get( 0 ).getVersion(), "1.0.1", "Search result version" );
- Assert.assertEquals( results.get( 0 ).getPackaging(), "jar", "Search result packaging" );
+ Assert.assertEquals( "Search result artifact id", results.get( 0 ).getArtifactId(), "nexus725-artifact-1" );
+ Assert.assertEquals( "Search result group id", results.get( 0 ).getGroupId(), "nexus725" );
+ Assert.assertEquals( "Search result version", results.get( 0 ).getVersion(), "1.0.1" );
+ Assert.assertEquals( "Search result packaging", results.get( 0 ).getPackaging(), "jar" );
client.disconnect();
@@ -240,11 +240,11 @@ public void checkForErrorsInRepsonse()
catch ( NexusConnectionException e )
{
// make sure we have an error
- Assert.assertTrue( e.getErrors().size() > 0,
- "NexusConnectionException should contain at least 1 NexusError" );
+ Assert.assertTrue( "NexusConnectionException should contain at least 1 NexusError",
+ e.getErrors().size() > 0 );
// make sure the error is in the stacktrace
- Assert.assertTrue( e.getMessage().contains( e.getErrors().get( 0 ).getMsg() ), "Expected message in error" );
+ Assert.assertTrue( "Expected message in error", e.getMessage().contains( e.getErrors().get( 0 ).getMsg() ) );
}
}
View
9 ...atype/nexus/integrationtests/nexus1022/Nexus1022RebuildRepositoryMavenMetadataTaskIT.java
@@ -15,13 +15,12 @@
import java.io.File;
import java.net.URL;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest;
import org.sonatype.nexus.maven.tasks.descriptors.RebuildMavenMetadataTaskDescriptor;
import org.sonatype.nexus.rest.model.ScheduledServicePropertyResource;
-import org.sonatype.nexus.scheduling.TaskUtils;
import org.sonatype.nexus.test.utils.TaskScheduleUtil;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1022RebuildRepositoryMavenMetadataTaskIT
extends AbstractNexusIntegrationTest
@@ -49,10 +48,10 @@ public void rebuildMavenMetadata()
File artifactDirMd =
new File( nexusWorkDir, repoPrefix + "nexus1022/foo/bar/artifact/maven-metadata.xml" );
- Assert.assertTrue( artifactDirMd.exists(), "Maven metadata file should be generated after rebuild" );
+ Assert.assertTrue( "Maven metadata file should be generated after rebuild", artifactDirMd.exists() );
File groupPluginMd = new File( nexusWorkDir, repoPrefix + "nexus1022/foo/bar/plugins/maven-metadata.xml" );
- Assert.assertTrue( groupPluginMd.exists(), "Maven metadata file should be generated after rebuild" );
+ Assert.assertTrue( "Maven metadata file should be generated after rebuild", groupPluginMd.exists() );
// just downloading it into dummy, since we are just checking is download possible
// if not, downloadFile() will fail anyway. The content is not we are interested in.
View
19 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus1071/Nexus1071AnonAccessIT.java
@@ -12,20 +12,21 @@
*/
package org.sonatype.nexus.integrationtests.nexus1071;
-import static org.sonatype.nexus.integrationtests.ITGroups.SECURITY;
-import static org.testng.Assert.assertTrue;
+import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.sonatype.nexus.integrationtests.AbstractPrivilegeTest;
+import org.sonatype.nexus.integrationtests.ITGroups.SECURITY;
import org.sonatype.nexus.integrationtests.TestContainer;
import org.sonatype.nexus.test.utils.FileTestingUtils;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
/**
* @author Juven Xu
@@ -34,12 +35,12 @@
extends AbstractPrivilegeTest
{
- @BeforeClass(alwaysRun = true)
- public void setSecureTest(){
+ @BeforeClass
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void downloadArtifactFromPublicGroup()
throws Exception
{
@@ -59,7 +60,7 @@ public void downloadArtifactFromPublicGroup()
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void downloadArtifactFromInternalRepo()
throws Exception
{
View
22 ...rg/sonatype/nexus/integrationtests/nexus1071/Nexus1071DeployToRepoAnonCannotAccessIT.java
@@ -12,17 +12,17 @@
*/
package org.sonatype.nexus.integrationtests.nexus1071;
-import static org.sonatype.nexus.integrationtests.ITGroups.SECURITY;
-
import java.io.File;
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.sonatype.nexus.integrationtests.AbstractMavenNexusIT;
+import org.sonatype.nexus.integrationtests.ITGroups.SECURITY;
import org.sonatype.nexus.integrationtests.TestContainer;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
/**
* @author Juven Xu
@@ -30,12 +30,12 @@
public class Nexus1071DeployToRepoAnonCannotAccessIT
extends AbstractMavenNexusIT
{
- @BeforeClass(alwaysRun = true)
- public void setSecureTest(){
+ @BeforeClass
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void deployRepeatly()
throws Exception
{
@@ -73,7 +73,7 @@ public void deployRepeatly()
}
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void deploySnapshot()
throws Exception
{
@@ -98,7 +98,7 @@ public void deploySnapshot()
}
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void deployToAnotherRepo()
throws Exception
{
@@ -122,7 +122,7 @@ public void deployToAnotherRepo()
}
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void anonDeploy()
throws Exception
{
View
8 ...va/org/sonatype/nexus/integrationtests/nexus1170/Nexus1170ReducePermissionCheckingIT.java
@@ -17,6 +17,9 @@
import java.util.List;
import java.util.Set;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.restlet.data.Method;
import org.restlet.data.Response;
@@ -31,16 +34,13 @@
import org.sonatype.security.rest.model.ClientPermission;
import org.sonatype.security.rest.model.PrivilegeProperty;
import org.sonatype.security.rest.model.PrivilegeStatusResource;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
public class Nexus1170ReducePermissionCheckingIT
extends AbstractNexusIntegrationTest
{
@BeforeClass
- public void setSecureTest(){
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
View
11 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus1197/Nexus1197CheckUserAgentIT.java
@@ -13,18 +13,19 @@
package org.sonatype.nexus.integrationtests.nexus1197;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.anyOf;
+import static org.hamcrest.Matchers.containsString;
import java.io.FileNotFoundException;
-import static org.hamcrest.Matchers.*;
import org.eclipse.jetty.server.Server;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.sonatype.jettytestsuite.BlockingServer;
import org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest;
import org.sonatype.nexus.test.utils.TestProperties;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
public class Nexus1197CheckUserAgentIT
extends AbstractNexusIntegrationTest
View
54 ...est/java/org/sonatype/nexus/integrationtests/nexus1239/Nexus1239PlexusUserResourceIT.java
@@ -16,22 +16,22 @@
import java.util.ArrayList;
import java.util.List;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest;
import org.sonatype.nexus.integrationtests.TestContainer;
import org.sonatype.nexus.test.utils.UserMessageUtil;
import org.sonatype.security.rest.model.PlexusRoleResource;
import org.sonatype.security.rest.model.PlexusUserResource;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
public class Nexus1239PlexusUserResourceIT
extends AbstractNexusIntegrationTest
{
@BeforeClass
- public void setSecureTest(){
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
@@ -43,18 +43,18 @@ public void getUserTestWithSource()
UserMessageUtil userUtil = new UserMessageUtil( this, this.getJsonXStream(), MediaType.APPLICATION_JSON );
PlexusUserResource user = userUtil.getPlexusUser( "default", "admin" );
- Assert.assertEquals( "admin", user.getUserId() );
- Assert.assertEquals( "changeme@yourcompany.com", user.getEmail() );
- Assert.assertEquals( "Administrator", user.getFirstName() );
- Assert.assertEquals( "default", user.getSource() );
+ Assert.assertEquals( user.getUserId(), "admin" );
+ Assert.assertEquals( user.getEmail(), "changeme@yourcompany.com" );
+ Assert.assertEquals( user.getFirstName(), "Administrator" );
+ Assert.assertEquals( user.getSource(), "default" );
List<PlexusRoleResource> roles = user.getRoles();
Assert.assertEquals( 1, roles.size() );
PlexusRoleResource role = roles.get( 0 );
- Assert.assertEquals( "Nexus Administrator Role", role.getName() );
- Assert.assertEquals( "nx-admin", role.getRoleId() );
- Assert.assertEquals( "default", role.getSource() );
+ Assert.assertEquals( role.getName(), "Nexus Administrator Role" );
+ Assert.assertEquals( role.getRoleId(), "nx-admin" );
+ Assert.assertEquals( role.getSource(), "default" );
}
@SuppressWarnings( "unchecked" )
@@ -65,18 +65,18 @@ public void getUserTestWithOutSource()
UserMessageUtil userUtil = new UserMessageUtil( this, this.getJsonXStream(), MediaType.APPLICATION_JSON );
PlexusUserResource user = userUtil.getPlexusUser( null, "admin" );
- Assert.assertEquals( "admin", user.getUserId() );
- Assert.assertEquals( "changeme@yourcompany.com", user.getEmail() );
- Assert.assertEquals( "Administrator", user.getFirstName() );
- Assert.assertEquals( "default", user.getSource() );
+ Assert.assertEquals( user.getUserId(), "admin" );
+ Assert.assertEquals( user.getEmail(), "changeme@yourcompany.com" );
+ Assert.assertEquals( user.getFirstName(), "Administrator" );
+ Assert.assertEquals( user.getSource(), "default" );
List<PlexusRoleResource> roles = user.getRoles();
Assert.assertEquals( 1, roles.size() );
PlexusRoleResource role = roles.get( 0 );
- Assert.assertEquals( "Nexus Administrator Role", role.getName() );
- Assert.assertEquals( "nx-admin", role.getRoleId() );
- Assert.assertEquals( "default", role.getSource() );
+ Assert.assertEquals( role.getName(), "Nexus Administrator Role" );
+ Assert.assertEquals( role.getRoleId(), "nx-admin" );
+ Assert.assertEquals( role.getSource(), "default" );
}
@SuppressWarnings( "unchecked" )
@@ -87,18 +87,18 @@ public void getUserTestWithAllSource()
UserMessageUtil userUtil = new UserMessageUtil( this, this.getJsonXStream(), MediaType.APPLICATION_JSON );
PlexusUserResource user = userUtil.getPlexusUser( "all", "admin" );
- Assert.assertEquals( "admin", user.getUserId() );
- Assert.assertEquals( "changeme@yourcompany.com", user.getEmail() );
- Assert.assertEquals( "Administrator", user.getFirstName() );
- Assert.assertEquals( "default", user.getSource() );
+ Assert.assertEquals( user.getUserId(), "admin" );
+ Assert.assertEquals( user.getEmail(), "changeme@yourcompany.com" );
+ Assert.assertEquals( user.getFirstName(), "Administrator" );
+ Assert.assertEquals( user.getSource(), "default" );
List<PlexusRoleResource> roles = user.getRoles();
Assert.assertEquals( 1, roles.size() );
PlexusRoleResource role = roles.get( 0 );
- Assert.assertEquals( "Nexus Administrator Role", role.getName() );
- Assert.assertEquals( "nx-admin", role.getRoleId() );
- Assert.assertEquals( "default", role.getSource() );
+ Assert.assertEquals( role.getName(), "Nexus Administrator Role" );
+ Assert.assertEquals( role.getRoleId(), "nx-admin" );
+ Assert.assertEquals( role.getSource(), "default" );
}
@SuppressWarnings( "unchecked" )
@@ -120,7 +120,7 @@ public void getUsersTest()
Assert.assertTrue( userIds.contains( "anonymous" ) );
Assert.assertTrue( userIds.contains( "deployment" ) );
Assert.assertTrue( userIds.contains( "test-user" ) );
- Assert.assertEquals( users.size(), 4, "Users: " + userIds );
+ Assert.assertEquals( "Users: " + userIds, users.size(), 4 );
}
@SuppressWarnings( "unchecked" )
@@ -146,7 +146,7 @@ public void getUsersTestAllSource()
// NOTE: this needs to be at least the number of users expected in the default realm, the In-Memory realm add
// another user locator, and there is no way to disable it.
- Assert.assertTrue( users.size() >= 4, "Users: " + userIds );
+ Assert.assertTrue( "Users: " + userIds, users.size() >= 4 );
}
@SuppressWarnings( "unchecked" )
View
22 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus1239/Nexus1239UserSearchIT.java
@@ -16,22 +16,22 @@
import java.util.ArrayList;
import java.util.List;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest;
import org.sonatype.nexus.integrationtests.TestContainer;
import org.sonatype.nexus.test.utils.UserMessageUtil;
import org.sonatype.security.rest.model.PlexusRoleResource;
import org.sonatype.security.rest.model.PlexusUserResource;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
public class Nexus1239UserSearchIT
extends AbstractNexusIntegrationTest
{
@BeforeClass
- public void setSecureTest(){
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
@@ -45,18 +45,18 @@ public void userExactSearchTest()
Assert.assertEquals( 1, users.size() );
PlexusUserResource user = users.get( 0 );
- Assert.assertEquals( "admin", user.getUserId() );
- Assert.assertEquals( "changeme@yourcompany.com", user.getEmail() );
- Assert.assertEquals( "Administrator", user.getFirstName() );
- Assert.assertEquals( "default", user.getSource() );
+ Assert.assertEquals( user.getUserId(), "admin" );
+ Assert.assertEquals( user.getEmail(), "changeme@yourcompany.com" );
+ Assert.assertEquals( user.getFirstName(), "Administrator" );
+ Assert.assertEquals( user.getSource(), "default" );
List<PlexusRoleResource> roles = user.getRoles();
Assert.assertEquals( 1, roles.size() );
PlexusRoleResource role = roles.get( 0 );
- Assert.assertEquals( "Nexus Administrator Role", role.getName() );
- Assert.assertEquals( "nx-admin", role.getRoleId() );
- Assert.assertEquals( "default", role.getSource() );
+ Assert.assertEquals( role.getName(), "Nexus Administrator Role" );
+ Assert.assertEquals( role.getRoleId(), "nx-admin" );
+ Assert.assertEquals( role.getSource(), "default" );
}
@Test
View
29 ...t/java/org/sonatype/nexus/integrationtests/nexus1239/Nexus1239UserSearchPermissionIT.java
@@ -12,28 +12,29 @@
*/
package org.sonatype.nexus.integrationtests.nexus1239;
-import static org.sonatype.nexus.integrationtests.ITGroups.*;
-import static org.sonatype.nexus.test.utils.ResponseMatchers.*;
+import static org.sonatype.nexus.test.utils.ResponseMatchers.respondsWithStatusCode;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.restlet.data.MediaType;
import org.sonatype.nexus.integrationtests.AbstractPrivilegeTest;
+import org.sonatype.nexus.integrationtests.ITGroups.SECURITY;
import org.sonatype.nexus.integrationtests.RequestFacade;
import org.sonatype.nexus.integrationtests.TestContainer;
import org.sonatype.nexus.test.utils.UserMessageUtil;
import org.sonatype.security.rest.model.PlexusRoleResource;
import org.sonatype.security.rest.model.PlexusUserResource;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1239UserSearchPermissionIT
extends AbstractPrivilegeTest
{
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void userExactSearchTest()
throws IOException
{
@@ -47,21 +48,21 @@ public void userExactSearchTest()
Assert.assertEquals( 1, users.size() );
PlexusUserResource user = users.get( 0 );
- Assert.assertEquals( "admin", user.getUserId() );
- Assert.assertEquals( "changeme@yourcompany.com", user.getEmail() );
- Assert.assertEquals( "Administrator", user.getFirstName() );
- Assert.assertEquals( "default", user.getSource() );
+ Assert.assertEquals( user.getUserId(), "admin" );
+ Assert.assertEquals( user.getEmail(), "changeme@yourcompany.com" );
+ Assert.assertEquals( user.getFirstName(), "Administrator" );
+ Assert.assertEquals( user.getSource(), "default" );
List<PlexusRoleResource> roles = user.getRoles();
Assert.assertEquals( 1, roles.size() );
PlexusRoleResource role = roles.get( 0 );
- Assert.assertEquals( "Nexus Administrator Role", role.getName() );
- Assert.assertEquals( "nx-admin", role.getRoleId() );
- Assert.assertEquals( "default", role.getSource() );
+ Assert.assertEquals( role.getName(), "Nexus Administrator Role" );
+ Assert.assertEquals( role.getRoleId(), "nx-admin" );
+ Assert.assertEquals( role.getSource(), "default" );
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void userSearchTest()
throws IOException
{
@@ -86,7 +87,7 @@ public void userSearchTest()
Assert.assertTrue( userIds.contains( "anonymous" ) );
}
- @Test(groups = SECURITY)
+ @Test @Category(SECURITY.class)
public void emptySearchTest()
throws IOException
{
View
12 .../java/org/sonatype/nexus/integrationtests/nexus1240/Nexus1240SourceInLoginResourceIT.java
@@ -14,6 +14,9 @@
import java.io.IOException;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.restlet.data.Method;
import org.restlet.data.Response;
@@ -25,15 +28,12 @@
import org.sonatype.security.rest.model.AuthenticationClientPermissions;
import org.sonatype.security.rest.model.AuthenticationLoginResource;
import org.sonatype.security.rest.model.AuthenticationLoginResourceResponse;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
public class Nexus1240SourceInLoginResourceIT
extends AbstractNexusIntegrationTest
{
@BeforeClass
- public void setSecureTest(){
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
@@ -42,7 +42,7 @@ public void sourceInLoginResourceTest() throws IOException
{
AuthenticationClientPermissions clientPermissions = this.getPermissions();
- Assert.assertEquals( "default", clientPermissions.getLoggedInUserSource() );
+ Assert.assertEquals( clientPermissions.getLoggedInUserSource(), "default" );
}
private AuthenticationClientPermissions getPermissions()
@@ -51,7 +51,7 @@ private AuthenticationClientPermissions getPermissions()
Response response = RequestFacade
.sendMessage( RequestFacade.SERVICE_LOCAL + "authentication/login", Method.GET );
- Assert.assertTrue( response.getStatus().isSuccess(), "Status: "+ response.getStatus() );
+ Assert.assertTrue( "Status: "+ response.getStatus(), response.getStatus().isSuccess() );
String responseText = response.getEntity().getText();
View
6 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1286/Nexus1286RoleListIT.java
@@ -12,21 +12,21 @@
*/
package org.sonatype.nexus.integrationtests.nexus1286;
-import static org.sonatype.nexus.test.utils.ResponseMatchers.*;
+import static org.sonatype.nexus.test.utils.ResponseMatchers.respondsWithStatusCode;
import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import org.junit.Assert;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest;
import org.sonatype.nexus.integrationtests.RequestFacade;
import org.sonatype.nexus.test.utils.RoleMessageUtil;
import org.sonatype.security.rest.model.ExternalRoleMappingResource;
import org.sonatype.security.rest.model.PlexusRoleResource;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1286RoleListIT
extends AbstractNexusIntegrationTest
View
22 ...t/java/org/sonatype/nexus/integrationtests/nexus1328/Nexus1328RepositoryMirrorRestIT.java
@@ -14,6 +14,8 @@
import java.io.IOException;
+import org.junit.Assert;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest;
import org.sonatype.nexus.rest.model.MirrorResource;
@@ -22,8 +24,6 @@
import org.sonatype.nexus.rest.model.MirrorStatusResource;
import org.sonatype.nexus.rest.model.MirrorStatusResourceListResponse;
import org.sonatype.nexus.test.utils.MirrorMessageUtils;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1328RepositoryMirrorRestIT
extends AbstractNexusIntegrationTest
@@ -84,9 +84,9 @@ public void updateMirrorTest()
MirrorResource two = response.getData().get( 1 );
MirrorResource three = response.getData().get( 2 );
- Assert.assertEquals( "http://updateMirrorTest4", one.getUrl() );
- Assert.assertEquals( "http://updateMirrorTest2", two.getUrl() );
- Assert.assertEquals( "http://updateMirrorTest3", three.getUrl() );
+ Assert.assertEquals( one.getUrl(), "http://updateMirrorTest4" );
+ Assert.assertEquals( two.getUrl(), "http://updateMirrorTest2" );
+ Assert.assertEquals( three.getUrl(), "http://updateMirrorTest3" );
}
@Test
@@ -110,8 +110,8 @@ public void getMirrorTest()
MirrorResource one = response.getData().get( 0 );
MirrorResource two = response.getData().get( 1 );
- Assert.assertEquals( "http://getMirrorTest1", one.getUrl() );
- Assert.assertEquals( "http://getMirrorTest2", two.getUrl() );
+ Assert.assertEquals( one.getUrl(), "http://getMirrorTest1" );
+ Assert.assertEquals( two.getUrl(), "http://getMirrorTest2" );
}
@Test
@@ -135,10 +135,10 @@ public void mirrorStatusTest()
MirrorStatusResource one = response.getData().get( 0 );
MirrorStatusResource two = response.getData().get( 1 );
- Assert.assertEquals( "http://mirrorStatusTest1", one.getUrl() );
- Assert.assertEquals( "http://mirrorStatusTest2", two.getUrl() );
- Assert.assertEquals( "Available", one.getStatus() );
- Assert.assertEquals( "Available", two.getStatus() );
+ Assert.assertEquals( one.getUrl(), "http://mirrorStatusTest1" );
+ Assert.assertEquals( two.getUrl(), "http://mirrorStatusTest2" );
+ Assert.assertEquals( one.getStatus(), "Available" );
+ Assert.assertEquals( two.getStatus(), "Available" );
}
@Test
View
8 ...ess-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/AbstractMirrorIT.java
@@ -12,13 +12,13 @@
*/
package org.sonatype.nexus.integrationtests.nexus1329;
+import org.junit.After;
+import org.junit.Before;
import org.restlet.data.MediaType;
import org.sonatype.jettytestsuite.ControlledServer;
import org.sonatype.nexus.integrationtests.AbstractNexusIntegrationTest;
import org.sonatype.nexus.test.utils.MirrorMessageUtils;
import org.sonatype.nexus.test.utils.TestProperties;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
public abstract class AbstractMirrorIT
extends AbstractNexusIntegrationTest
@@ -43,14 +43,14 @@ public AbstractMirrorIT()
this.messageUtil = new MirrorMessageUtils( this.getJsonXStream(), MediaType.APPLICATION_JSON );
}
- @BeforeMethod
+ @Before
public void start()
throws Exception
{
server = lookup( ControlledServer.class );
}
- @AfterMethod
+ @After
public void stop()
throws Exception
{
View
8 ...va/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329AbstractCheckOnlyOneMirror.java
@@ -18,9 +18,9 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.test.utils.FileTestingUtils;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public abstract class Nexus1329AbstractCheckOnlyOneMirror
extends AbstractMirrorIT
@@ -50,8 +50,8 @@ public void checkSingleMirror()
File originalFile = this.getTestFile( "basic/nexus1329/sample/1.0.0/sample-1.0.0.xml" );
Assert.assertTrue( FileTestingUtils.compareFileSHA1s( originalFile, artifactFile ) );
- Assert.assertTrue( mirror1Urls.size() > 0, "Nexus should access first mirror " + mirror1Urls );
- Assert.assertTrue( mirror2Urls.isEmpty(), "Nexus should not access second mirror " + mirror2Urls );
+ Assert.assertTrue( "Nexus should access first mirror " + mirror1Urls, mirror1Urls.size() > 0 );
+ Assert.assertTrue( "Nexus should not access second mirror " + mirror2Urls, mirror2Urls.isEmpty() );
}
protected void beforeCheck()
View
10 ...-its/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329ChecksumIT.java
@@ -16,9 +16,9 @@
import java.util.List;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.test.utils.FileTestingUtils;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1329ChecksumIT
extends AbstractMirrorIT
@@ -45,9 +45,9 @@ public void downloadChecksumTest()
File originalFile = this.getTestFile( "basic/nexus1329/sample/1.0.0/sample-1.0.0.xml" );
Assert.assertTrue( FileTestingUtils.compareFileSHA1s( originalFile, artifactFile ) );
- Assert.assertTrue( mirror2Urls.isEmpty(), "Nexus should not access second mirror " + mirror2Urls );
- Assert.assertFalse( repoUrls.isEmpty(), "Nexus did not download checksum " + repoUrls );
- Assert.assertFalse( mirror1Urls.isEmpty(), "Nexus should access first mirror " + mirror1Urls );
+ Assert.assertTrue( "Nexus should not access second mirror " + mirror2Urls, mirror2Urls.isEmpty() );
+ Assert.assertFalse( "Nexus did not download checksum " + repoUrls, repoUrls.isEmpty() );
+ Assert.assertFalse( "Nexus should access first mirror " + mirror1Urls, mirror1Urls.isEmpty() );
}
}
View
14 ...t/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329MirrorFailAndRetriesIT.java
@@ -18,11 +18,11 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.rest.model.MirrorStatusResource;
import org.sonatype.nexus.rest.model.MirrorStatusResourceListResponse;
import org.sonatype.nexus.test.utils.FileTestingUtils;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1329MirrorFailAndRetriesIT
extends AbstractMirrorIT
@@ -51,15 +51,15 @@ public void downloadFromMirrorTest()
File originalFile = this.getTestFile( "basic/nexus1329/sample/1.0.0/sample-1.0.0.xml" );
Assert.assertTrue( FileTestingUtils.compareFileSHA1s( originalFile, artifactFile ) );
- Assert.assertFalse( mirror1Urls.isEmpty(), "Nexus should access first mirror " + mirror1Urls );
- Assert.assertEquals( mirror1Urls.size(), 3, "Nexus should retry mirror " + mirror1Urls );
- Assert.assertTrue( mirror2Urls.isEmpty(), "Nexus should not access second mirror " + mirror2Urls );
+ Assert.assertFalse( "Nexus should access first mirror " + mirror1Urls, mirror1Urls.isEmpty() );
+ Assert.assertEquals( "Nexus should retry mirror " + mirror1Urls, mirror1Urls.size(), 3 );
+ Assert.assertTrue( "Nexus should not access second mirror " + mirror2Urls, mirror2Urls.isEmpty() );
MirrorStatusResourceListResponse response = this.messageUtil.getMirrorsStatus( REPO );
MirrorStatusResource one = (MirrorStatusResource) response.getData().get( 0 );
- Assert.assertEquals( "http://localhost:" + webProxyPort + "/mirror1", one.getUrl() );
- Assert.assertEquals( "Blacklisted", one.getStatus() );
+ Assert.assertEquals( one.getUrl(), "http://localhost:" + webProxyPort + "/mirror1" );
+ Assert.assertEquals( one.getStatus(), "Blacklisted" );
}
}
View
14 ...est/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329MirrorFailNoRetiesIT.java
@@ -18,11 +18,11 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.rest.model.MirrorStatusResource;
import org.sonatype.nexus.rest.model.MirrorStatusResourceListResponse;
import org.sonatype.nexus.test.utils.FileTestingUtils;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1329MirrorFailNoRetiesIT
extends AbstractMirrorIT
@@ -51,15 +51,15 @@ public void downloadFromMirrorTest()
File originalFile = this.getTestFile( "basic/nexus1329/sample/1.0.0/sample-1.0.0.xml" );
Assert.assertTrue( FileTestingUtils.compareFileSHA1s( originalFile, artifactFile ) );
- Assert.assertFalse( mirror1Urls.isEmpty(), "Nexus should access first mirror " + mirror1Urls );
- Assert.assertEquals( mirror1Urls.size(), 1, "Nexus should not retry mirror " + mirror1Urls );
- Assert.assertTrue( mirror2Urls.isEmpty(), "Nexus should not access second mirror " + mirror2Urls );
+ Assert.assertFalse( "Nexus should access first mirror " + mirror1Urls, mirror1Urls.isEmpty() );
+ Assert.assertEquals( "Nexus should not retry mirror " + mirror1Urls, mirror1Urls.size(), 1 );
+ Assert.assertTrue( "Nexus should not access second mirror " + mirror2Urls, mirror2Urls.isEmpty() );
MirrorStatusResourceListResponse response = this.messageUtil.getMirrorsStatus( REPO );
MirrorStatusResource one = (MirrorStatusResource) response.getData().get( 0 );
- Assert.assertEquals( "http://localhost:" + webProxyPort + "/mirror1", one.getUrl() );
- Assert.assertEquals( "Blacklisted", one.getStatus() );
+ Assert.assertEquals( one.getUrl(), "http://localhost:" + webProxyPort + "/mirror1" );
+ Assert.assertEquals( one.getStatus(), "Blacklisted" );
}
}
View
8 ...ts/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329MirrorOnlyIT.java
@@ -18,9 +18,9 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.test.utils.FileTestingUtils;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1329MirrorOnlyIT
extends AbstractMirrorIT
@@ -49,8 +49,8 @@ public void downloadFileThatIsOnlyInMirrorTest()
File originalFile = this.getTestFile( "basic/nexus1329/sample/1.0.0/sample-1.0.0.xml" );
Assert.assertTrue( FileTestingUtils.compareFileSHA1s( originalFile, artifactFile ) );
- Assert.assertTrue( repoUrls.isEmpty(), "Nexus should not access repository canonical url " + repoUrls );
- Assert.assertTrue( mirror2Urls.isEmpty(), "Nexus should not access second mirror " + mirror2Urls );
+ Assert.assertTrue( "Nexus should not access repository canonical url " + repoUrls, repoUrls.isEmpty() );
+ Assert.assertTrue( "Nexus should not access second mirror " + mirror2Urls, mirror2Urls.isEmpty() );
}
}
View
12 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329RetryMirrorIT.java
@@ -18,9 +18,9 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.test.utils.FileTestingUtils;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1329RetryMirrorIT
extends AbstractMirrorIT
@@ -49,10 +49,10 @@ public void downloadFileThatIsOnlyInMirrorTest()
File originalFile = this.getTestFile( "basic/nexus1329/sample/1.0.0/sample-1.0.0.xml" );
Assert.assertTrue( FileTestingUtils.compareFileSHA1s( originalFile, artifactFile ) );
- Assert.assertTrue( repoUrls.isEmpty(), "Nexus should not access repository canonical url " + repoUrls );
- Assert.assertTrue( mirror2Urls.isEmpty(), "Nexus should not access second mirror " + mirror2Urls );
- Assert.assertFalse( mirror1Urls.isEmpty(), "Nexus should access first mirror " + mirror1Urls );
- Assert.assertEquals( mirror1Urls.size(), 2, "Nexus should retry first mirror " + mirror1Urls );
+ Assert.assertTrue( "Nexus should not access repository canonical url " + repoUrls, repoUrls.isEmpty() );
+ Assert.assertTrue( "Nexus should not access second mirror " + mirror2Urls, mirror2Urls.isEmpty() );
+ Assert.assertFalse( "Nexus should access first mirror " + mirror1Urls, mirror1Urls.isEmpty() );
+ Assert.assertEquals( "Nexus should retry first mirror " + mirror1Urls, mirror1Urls.size(), 2 );
}
}
View
12 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus1329/Nexus1329UnavailableIT.java
@@ -16,10 +16,10 @@
import java.util.List;
import org.apache.maven.index.artifact.Gav;
+import org.junit.Assert;
+import org.junit.Test;
import org.sonatype.nexus.rest.model.MirrorStatusResource;
import org.sonatype.nexus.rest.model.MirrorStatusResourceListResponse;
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class Nexus1329UnavailableIT
extends AbstractMirrorIT
@@ -51,15 +51,15 @@ public void downloadUnavailable()
// expected
}
- Assert.assertFalse( repoUrls.isEmpty(), "Nexus should try repository canonical url " + repoUrls );
- Assert.assertFalse( mirror1Urls.isEmpty(), "Nexus should try mirror 1 " + mirror1Urls );
+ Assert.assertFalse( "Nexus should try repository canonical url " + repoUrls, repoUrls.isEmpty() );
+ Assert.assertFalse( "Nexus should try mirror 1 " + mirror1Urls, mirror1Urls.isEmpty() );
MirrorStatusResourceListResponse response = this.messageUtil.getMirrorsStatus( REPO );
MirrorStatusResource one = (MirrorStatusResource) response.getData().get( 0 );
- Assert.assertEquals( "http://localhost:" + webProxyPort + "/mirror1", one.getUrl() );
- Assert.assertEquals( "Available", one.getStatus() );
+ Assert.assertEquals( one.getUrl(), "http://localhost:" + webProxyPort + "/mirror1" );
+ Assert.assertEquals( one.getStatus(), "Available" );
}
}
View
18 .../src/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetCrudJsonIT.java
@@ -17,6 +17,10 @@
import java.util.List;
import org.codehaus.plexus.util.StringUtils;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.restlet.data.Method;
import org.restlet.data.Response;
@@ -25,9 +29,6 @@
import org.sonatype.nexus.rest.model.RepositoryTargetListResource;
import org.sonatype.nexus.rest.model.RepositoryTargetResource;
import org.sonatype.nexus.test.utils.TargetMessageUtil;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
/**
* CRUD tests for JSON request/response.
@@ -39,12 +40,17 @@
protected TargetMessageUtil messageUtil;
@BeforeClass
- public void setSecureTest(){
- this.messageUtil =
- new TargetMessageUtil( this, this.getJsonXStream(), MediaType.APPLICATION_JSON );
+ public static void setSecureTest()
+ {
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
+ @Before
+ public void setUp()
+ {
+ this.messageUtil = new TargetMessageUtil( this, this.getJsonXStream(), MediaType.APPLICATION_JSON );
+ }
+
@Test
public void createTargetTest()
throws IOException
View
16 ...s/src/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetCrudXmlIT.java
@@ -14,11 +14,12 @@
import java.io.IOException;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.sonatype.nexus.integrationtests.TestContainer;
import org.sonatype.nexus.test.utils.TargetMessageUtil;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
/**
* CRUD tests for XML request/response.
@@ -28,14 +29,15 @@
{
@BeforeClass
- public void setSecureTest(){
- this.messageUtil =
- new TargetMessageUtil( this, this.getXMLXStream(),
- MediaType.APPLICATION_XML );
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
-
+ @Before
+ public void setUp()
+ {
+ this.messageUtil = new TargetMessageUtil( this, this.getXMLXStream(), MediaType.APPLICATION_XML );
+ }
@Test
public void readTest()
View
54 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetPermissionIT.java
@@ -14,14 +14,14 @@
import java.io.IOException;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.Method;
import org.restlet.data.Response;
import org.sonatype.nexus.integrationtests.AbstractPrivilegeTest;
import org.sonatype.nexus.integrationtests.TestContainer;
import org.sonatype.nexus.rest.model.RepositoryTargetResource;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
/**
* Test the privileges for CRUD operations.
@@ -31,7 +31,7 @@
{
@BeforeClass
- public void setSecureTest(){
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
@@ -48,7 +48,7 @@ public void testCreatePermission()
TestContainer.getInstance().getTestContext().setPassword( "admin123" );
Response response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// use admin
TestContainer.getInstance().getTestContext().useAdminForRequests();
@@ -61,20 +61,20 @@ public void testCreatePermission()
TestContainer.getInstance().getTestContext().setPassword( "admin123" );
response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 201, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 201 );
target = this.targetUtil.getResourceFromResponse( response );
// read should succeed (inherited)
response = this.targetUtil.sendMessage( Method.GET, target );
- Assert.assertEquals( response.getStatus().getCode(), 200, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 200 );
// update should fail
response = this.targetUtil.sendMessage( Method.PUT, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// delete should fail
response = this.targetUtil.sendMessage( Method.DELETE, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
}
@@ -91,7 +91,7 @@ public void testUpdatePermission()
target.addPattern( ".*testUpdatePermission.*" );
Response response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 201, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 201 );
target = this.targetUtil.getResourceFromResponse( response );
TestContainer.getInstance().getTestContext().setUsername( "test-user" );
@@ -100,7 +100,7 @@ public void testUpdatePermission()
// update user
target.setName( "tesUpdatePermission2" );
response = this.targetUtil.sendMessage( Method.PUT, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// use admin
TestContainer.getInstance().getTestContext().useAdminForRequests();
@@ -113,19 +113,19 @@ public void testUpdatePermission()
// should work now...
response = this.targetUtil.sendMessage( Method.PUT, target );
- Assert.assertEquals( response.getStatus().getCode(), 200, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 200 );
// read should succeed (inherited)
response = this.targetUtil.sendMessage( Method.GET, target );
- Assert.assertEquals( response.getStatus().getCode(), 200, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 200 );
// update should fail
response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// delete should fail
response = this.targetUtil.sendMessage( Method.DELETE, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
}
@@ -142,7 +142,7 @@ public void testReadPermission()
target.addPattern( ".*testReadPermission.*" );
Response response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 201, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 201 );
target = this.targetUtil.getResourceFromResponse( response );
TestContainer.getInstance().getTestContext().setUsername( "test-user" );
@@ -151,7 +151,7 @@ public void testReadPermission()
// update user
target.setName( "tesUpdatePermission2" );
response = this.targetUtil.sendMessage( Method.PUT, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// use admin
TestContainer.getInstance().getTestContext().useAdminForRequests();
@@ -164,19 +164,19 @@ public void testReadPermission()
// read should fail
response = this.targetUtil.sendMessage( Method.GET, target );
- Assert.assertEquals( response.getStatus().getCode(), 200, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 200 );
// update should fail
response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// delete should fail
response = this.targetUtil.sendMessage( Method.PUT, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// should work now...
response = this.targetUtil.sendMessage( Method.DELETE, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
}
@@ -194,7 +194,7 @@ public void testDeletePermission()
target.addPattern( ".*testDeletePermission.*" );
Response response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 201, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 201 );
target = this.targetUtil.getResourceFromResponse( response );
TestContainer.getInstance().getTestContext().setUsername( "test-user" );
@@ -203,7 +203,7 @@ public void testDeletePermission()
// update user
target.setName( "tesUpdatePermission2" );
response = this.targetUtil.sendMessage( Method.DELETE, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// use admin
TestContainer.getInstance().getTestContext().useAdminForRequests();
@@ -216,19 +216,19 @@ public void testDeletePermission()
// read should succeed (inherited)
response = this.targetUtil.sendMessage( Method.GET, target );
- Assert.assertEquals( response.getStatus().getCode(), 200, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 200 );
// update should fail
response = this.targetUtil.sendMessage( Method.POST, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// delete should fail
response = this.targetUtil.sendMessage( Method.PUT, target );
- Assert.assertEquals( response.getStatus().getCode(), 403, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 403 );
// should work now...
response = this.targetUtil.sendMessage( Method.DELETE, target );
- Assert.assertEquals( response.getStatus().getCode(), 204, "Response status: " );
+ Assert.assertEquals( "Response status: ", response.getStatus().getCode(), 204 );
}
View
59 ...rc/test/java/org/sonatype/nexus/integrationtests/nexus133/Nexus133TargetValidationIT.java
@@ -17,6 +17,10 @@
import java.util.List;
import org.codehaus.plexus.util.StringUtils;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
import org.restlet.data.MediaType;
import org.restlet.data.Method;
import org.restlet.data.Response;
@@ -24,9 +28,6 @@
import org.sonatype.nexus.integrationtests.TestContainer;
import org.sonatype.nexus.rest.model.RepositoryTargetResource;
import org.sonatype.nexus.test.utils.TargetMessageUtil;
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
/**
* Extra CRUD validation tests.
@@ -38,11 +39,15 @@
protected TargetMessageUtil messageUtil;
@BeforeClass
- public void setSecureTest(){
- this.messageUtil =
- new TargetMessageUtil( this, this.getJsonXStream(), MediaType.APPLICATION_JSON );
+ public static void setSecureTest(){
TestContainer.getInstance().getTestContext().setSecureTest( true );
}
+
+ @Before
+ public void setUp()
+ {
+ this.messageUtil = new TargetMessageUtil( this, this.getJsonXStream(), MediaType.APPLICATION_JSON );
+ }
@Test
public void noPatternsTest()
@@ -67,8 +72,8 @@ public void noPatternsTest()
{
Assert.fail( "Target should not have been created: " + response.getStatus() + "\n" + responseText );
}
- Assert.assertTrue( responseText.startsWith( "{\"errors\":" ),
- "Response text did not contain an error message. \nResponse Text:\n " + responseText );
+ Assert.assertTrue( "Response text did not contain an error message. \nResponse Text:\n " + responseText,
+ responseText.startsWith( "{\"errors\":" ) );
}
@Test
@@ -93,8 +98,8 @@ public void noNameTest()
{
Assert.fail( "Target should not have been created: " + response.getStatus() + "\n" + responseText );
}
- Assert.assertTrue( responseText.startsWith( "{\"errors\":" ),
- "Response text did not contain an error message. \nResponse Text:\n " + responseText );
+ Assert.assertTrue( "Response text did not contain an error message. \nResponse Text:\n " + responseText,
+ responseText.startsWith( "{\"errors\":" ) );
}
@Test
@@ -119,8 +124,8 @@ public void invalidRegExTest()
{
Assert.fail( "Target should not have been created: " + response.getStatus() + "\n" + responseText );
}
- Assert.assertTrue( responseText.startsWith( "{\"errors\":" ),
- "Response text did not contain an error message. \nResponse Text:\n " + responseText );
+ Assert.assertTrue( "Response text did not contain an error message. \nResponse Text:\n " + responseText,
+ responseText.startsWith( "{\"errors\":" ) );
}
@Test