@@ -47,6 +47,7 @@ public class UsersAndGroups_Test {
4747 private static final Ds3ClientHelpers HELPERS = Ds3ClientHelpers .wrap (client );
4848 private static final String BUCKET_NAME = "Users_And_Groups_Test" ;
4949 private static final String TEST_ENV_NAME = "UsersAndGroups_Test" ;
50+ private static final String USER_ID = "spectra" ;
5051 private static TempStorageIds envStorageIds ;
5152 private static UUID spectraUUID ;
5253 private static UUID administratorsUUID ;
@@ -75,7 +76,7 @@ private static void setupBucket(final UUID dataPolicy) {
7576 try {
7677 HELPERS .ensureBucketExists (BUCKET_NAME , dataPolicy );
7778 spectraUUID = client .getUserSpectraS3 (
78- new GetUserSpectraS3Request ("spectra" )).getSpectraUserResult ().getId ();
79+ new GetUserSpectraS3Request (USER_ID )).getSpectraUserResult ().getId ();
7980 administratorsUUID = client .getGroupSpectraS3 (
8081 new GetGroupSpectraS3Request ("Administrators" )).getGroupResult ().getId ();
8182 } catch (final Exception e ) {
@@ -89,16 +90,16 @@ public void getUserWithUUID() throws IOException, SignatureException {
8990 final GetUserSpectraS3Response getSpectraResponse = client
9091 .getUserSpectraS3 (new GetUserSpectraS3Request (spectraUUID ));
9192
92- assertThat (getSpectraResponse .getSpectraUserResult ().getName (), is ("spectra" ));
93+ assertThat (getSpectraResponse .getSpectraUserResult ().getName (), is (USER_ID ));
9394 }
9495
9596 @ Test
9697 public void getUserWithString () throws IOException , SignatureException {
9798
9899 final GetUserSpectraS3Response getSpectraResponse = client
99- .getUserSpectraS3 (new GetUserSpectraS3Request ("spectra" ));
100+ .getUserSpectraS3 (new GetUserSpectraS3Request (USER_ID ));
100101
101- assertThat (getSpectraResponse .getSpectraUserResult ().getName (), is ("spectra" ));
102+ assertThat (getSpectraResponse .getSpectraUserResult ().getName (), is (USER_ID ));
102103 }
103104
104105 @ Test
@@ -114,7 +115,7 @@ public void getUsers() throws IOException, SignatureException {
114115 public void getUsersWithName () throws IOException , SignatureException {
115116
116117 final GetUsersSpectraS3Response getUsersResponse = client .getUsersSpectraS3 (
117- new GetUsersSpectraS3Request ().withName ("spectra" ));
118+ new GetUsersSpectraS3Request ().withName (USER_ID ));
118119
119120 assertThat (getUsersResponse .getSpectraUserListResult (), is (notNullValue ()));
120121 }
@@ -467,7 +468,7 @@ public void getUserGroupMembersWithMemberUserIDString() throws IOException, Sign
467468
468469 final GetGroupMembersSpectraS3Response getGroupMembersSpectraS3Response = client
469470 .getGroupMembersSpectraS3 (new GetGroupMembersSpectraS3Request ()
470- .withMemberUserId ("spectra" ));
471+ .withMemberUserId (USER_ID ));
471472
472473 assertThat (getGroupMembersSpectraS3Response .getGroupMemberListResult (), is (notNullValue ()));
473474 }
@@ -612,7 +613,7 @@ public void putUserGroupMember() throws IOException, SignatureException {
612613 new PutGroupSpectraS3Request ("test_group" ));
613614
614615 putUserGroupMemberSpectraS3Response = client
615- .putUserGroupMemberSpectraS3 (new PutUserGroupMemberSpectraS3Request ("test_group" , "spectra" ));
616+ .putUserGroupMemberSpectraS3 (new PutUserGroupMemberSpectraS3Request ("test_group" , USER_ID ));
616617
617618 assertThat (putUserGroupMemberSpectraS3Response .getGroupMemberResult (), is (notNullValue ()));
618619
@@ -688,7 +689,7 @@ public void putGlobalBucketAclForUserString() throws IOException, SignatureExcep
688689 try {
689690 putGlobalBucketAclForUserSpectraS3Response = client .putGlobalBucketAclForUserSpectraS3 (
690691 new PutGlobalBucketAclForUserSpectraS3Request (BucketAclPermission .DELETE ,
691- "spectra" ));
692+ USER_ID ));
692693
693694 assertThat (putGlobalBucketAclForUserSpectraS3Response .getBucketAclResult (), is (notNullValue ()));
694695
@@ -789,7 +790,7 @@ public void getBucketAclsWithUserUUID() throws IOException, SignatureException {
789790 @ Test
790791 public void getBucketAclsWithUserIDString () throws IOException , SignatureException {
791792 final GetBucketAclsSpectraS3Response getBucketAclsSpectraS3Response = client
792- .getBucketAclsSpectraS3 (new GetBucketAclsSpectraS3Request ().withUserId ("spectra" ));
793+ .getBucketAclsSpectraS3 (new GetBucketAclsSpectraS3Request ().withUserId (USER_ID ));
793794
794795 assertThat (getBucketAclsSpectraS3Response .getBucketAclListResult (), is (notNullValue ()));
795796 }
@@ -912,7 +913,7 @@ public void putGlobalDataPolicyAclForUserString() throws IOException, SignatureE
912913 PutGlobalDataPolicyAclForUserSpectraS3Response putGlobalDataPolicyAclForUserSpectraS3Response = null ;
913914 try {
914915 putGlobalDataPolicyAclForUserSpectraS3Response = client .putGlobalDataPolicyAclForUserSpectraS3 (
915- new PutGlobalDataPolicyAclForUserSpectraS3Request ("spectra" ));
916+ new PutGlobalDataPolicyAclForUserSpectraS3Request (USER_ID ));
916917
917918 assertThat (putGlobalDataPolicyAclForUserSpectraS3Response .getDataPolicyAclResult (), is (notNullValue ()));
918919
@@ -971,7 +972,7 @@ public void deleteDataPolicyAcl() throws IOException, SignatureException {
971972 = null ;
972973 try {
973974 putGlobalDataPolicyAclForUserSpectraS3Response = client .putGlobalDataPolicyAclForUserSpectraS3 (
974- new PutGlobalDataPolicyAclForUserSpectraS3Request ("spectra" ));
975+ new PutGlobalDataPolicyAclForUserSpectraS3Request (USER_ID ));
975976
976977 final DeleteDataPolicyAclSpectraS3Response deleteDataPolicyAclSpectraS3Response = client
977978 .deleteDataPolicyAclSpectraS3 (new DeleteDataPolicyAclSpectraS3Request (
@@ -998,7 +999,7 @@ public void getDataPolicyAcl() throws IOException, SignatureException {
998999 try {
9991000 putGlobalDataPolicyAclForUserSpectraS3Response = client
10001001 .putGlobalDataPolicyAclForUserSpectraS3 (
1001- new PutGlobalDataPolicyAclForUserSpectraS3Request ("spectra" ));
1002+ new PutGlobalDataPolicyAclForUserSpectraS3Request (USER_ID ));
10021003
10031004 final GetDataPolicyAclSpectraS3Response getDataPolicyAclSpectraS3Response = client
10041005 .getDataPolicyAclSpectraS3 (new GetDataPolicyAclSpectraS3Request (
@@ -1114,7 +1115,7 @@ public void getDataPolicyAclsWithUserString() throws IOException, SignatureExcep
11141115
11151116 final GetDataPolicyAclsSpectraS3Response getDataPolicyAclsSpectraS3Response = client
11161117 .getDataPolicyAclsSpectraS3 (new GetDataPolicyAclsSpectraS3Request ()
1117- .withUserId ("spectra" ));
1118+ .withUserId (USER_ID ));
11181119
11191120 assertThat (getDataPolicyAclsSpectraS3Response .getDataPolicyAclListResult (), is (notNullValue ()));
11201121 }
0 commit comments