Skip to content

Commit

Permalink
Remove uneccessary asssignemnts in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Apr 20, 2023
1 parent 37ac417 commit e0531f2
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,35 +331,29 @@ private void verifyPatch(final boolean sendAdminCert, Header... restAdminHeader)
rh.sendAdminCertificate = sendAdminCert;
response = rh.executeGetRequest(ENDPOINT + "/internalusers/happyServiceLive", restAdminHeader);
Assert.assertEquals(HttpStatus.SC_OK, response.getStatusCode());
settings = Settings.builder().loadFromSource(response.getBody(), XContentType.JSON).build();


// Add disabled service account
rh.sendAdminCertificate = sendAdminCert;
response = rh.executePutRequest(ENDPOINT + "/internalusers/happyServiceDead",
DISABLED_SERVICE_ACCOUNT_BODY, restAdminHeader);
Assert.assertEquals(response.getBody(), HttpStatus.SC_CREATED, response.getStatusCode());

// Add enabled non-service account
rh.sendAdminCertificate = sendAdminCert;
response = rh.executePutRequest(ENDPOINT + "/internalusers/user_is_owner_1",
ENABLED_NOT_SERVICE_ACCOUNT_BODY, restAdminHeader);
Assert.assertEquals(HttpStatus.SC_CREATED, response.getStatusCode());

// Add service account with password -- Should Fail
rh.sendAdminCertificate = sendAdminCert;
response = rh.executePutRequest(ENDPOINT + "/internalusers/passwordService",
PASSWORD_SERVICE, restAdminHeader);
Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, response.getStatusCode());

//Add service with hash -- should fail
rh.sendAdminCertificate = sendAdminCert;
response = rh.executePutRequest(ENDPOINT + "/internalusers/hashService",
HASH_SERVICE, restAdminHeader);
Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, response.getStatusCode());

// Add Service account with password & Hash -- should fail
rh.sendAdminCertificate = sendAdminCert;
response = rh.executePutRequest(ENDPOINT + "/internalusers/passwordHashService",
PASSWORD_HASH_SERVICE, restAdminHeader);
Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, response.getStatusCode());
Expand Down

0 comments on commit e0531f2

Please sign in to comment.