Skip to content

Commit

Permalink
reorder setsecret tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saidone75 committed Apr 16, 2024
1 parent 0b210a8 commit ee2e157
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,21 @@ public class TotpSetSecretIT extends TotpBaseIT {

@Order(1)
@Test
public void testSetEmptySecret() throws Exception {
var response = testWebScriptCall("/s/security/setsecret");
assertStandardJsonResponse(response);
assertSecretMatches("", response);
}

@Order(2)
@Test
public void testSetInvalidSecret() throws Exception {
var response = testWebScriptCall("/s/security/setsecret?secret=123");
assertStandardJsonResponse(response);
assertSecretMatches("", response);
}

@Order(2)
@Order(3)
@Test
public void testSetValidSecret() throws Exception {
var secret = "AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB";
Expand All @@ -48,7 +56,7 @@ public void testSetValidSecret() throws Exception {
assertSecretMatches(secret, response);
}

@Order(3)
@Order(4)
@Test
public void testSetValidSecret2() throws Exception {
var secret = "aaaaaaaaAAAAAAAA0000000011111111";
Expand All @@ -57,7 +65,7 @@ public void testSetValidSecret2() throws Exception {
assertSecretMatches(secret.toUpperCase(Locale.ROOT), response);
}

@Order(4)
@Order(5)
@Test
public void testSetValidSecret3() throws Exception {
var secret = "aaaaaaaaAAAAAAAA0000000011111111";
Expand All @@ -67,12 +75,4 @@ public void testSetValidSecret3() throws Exception {
assertSecretMatches(secret.toUpperCase(Locale.ROOT), response);
}

@Order(5)
@Test
public void testSetEmptySecret() throws Exception {
var response = testWebScriptCall("/s/security/setsecret");
assertStandardJsonResponse(response);
assertSecretMatches("", response);
}

}

0 comments on commit ee2e157

Please sign in to comment.