Skip to content

Commit

Permalink
make assertions about users #6783
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Dec 5, 2023
1 parent 8c9f124 commit 6a7d8d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/java/edu/harvard/iq/dataverse/api/S3AccessIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ public void testNonDirectUpload() {
String driverLabel = "MinIO";

Response createSuperuser = UtilIT.createRandomUser();
createSuperuser.then().assertThat().statusCode(200);
String superuserApiToken = UtilIT.getApiTokenFromResponse(createSuperuser);
String superusername = UtilIT.getUsernameFromResponse(createSuperuser);
UtilIT.makeSuperUser(superusername);
UtilIT.makeSuperUser(superusername).then().assertThat().statusCode(200);
Response storageDrivers = listStorageDrivers(superuserApiToken);
storageDrivers.prettyPrint();
// TODO where is "Local/local" coming from?
Expand All @@ -118,6 +119,7 @@ public void testNonDirectUpload() {

//create user who will make a dataverse/dataset
Response createUser = UtilIT.createRandomUser();
createUser.then().assertThat().statusCode(200);
String username = UtilIT.getUsernameFromResponse(createUser);
String apiToken = UtilIT.getApiTokenFromResponse(createUser);

Expand Down Expand Up @@ -208,9 +210,10 @@ public void testDirectUpload() {
String driverId = "localstack1";
String driverLabel = "LocalStack";
Response createSuperuser = UtilIT.createRandomUser();
createSuperuser.then().assertThat().statusCode(200);
String superuserApiToken = UtilIT.getApiTokenFromResponse(createSuperuser);
String superusername = UtilIT.getUsernameFromResponse(createSuperuser);
UtilIT.makeSuperUser(superusername);
UtilIT.makeSuperUser(superusername).then().assertThat().statusCode(200);
Response storageDrivers = listStorageDrivers(superuserApiToken);
storageDrivers.prettyPrint();
// TODO where is "Local/local" coming from?
Expand All @@ -227,6 +230,7 @@ public void testDirectUpload() {

//create user who will make a dataverse/dataset
Response createUser = UtilIT.createRandomUser();
createUser.then().assertThat().statusCode(200);
String username = UtilIT.getUsernameFromResponse(createUser);
String apiToken = UtilIT.getApiTokenFromResponse(createUser);

Expand Down

0 comments on commit 6a7d8d1

Please sign in to comment.