Skip to content

Commit

Permalink
Fix failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
dishenggg committed Jun 8, 2024
1 parent 06bfafd commit 3562d31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import teammates.it.test.BaseTestCaseWithSqlDatabaseAccess;
import teammates.storage.sqlapi.AccountRequestsDb;
import teammates.storage.sqlentity.AccountRequest;
import teammates.test.TestProperties;

/**
* SUT: {@link AccountRequestsDb}.
Expand Down Expand Up @@ -239,6 +240,10 @@ public void testSqlInjectionInDeleteAccountRequest() throws Exception {

@Test
public void testSqlInjectionSearchAccountRequestsInWholeSystem() throws Exception {
if (!TestProperties.isSearchServiceActive()) {
return;
}

______TS("SQL Injection test in searchAccountRequestsInWholeSystem");

AccountRequest accountRequest =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ protected void tearDown() {
for (AccountRequest ar : accountRequests) {
logic.deleteAccountRequest(ar.getId());
}

logic.deleteAccount(getTypicalAccount().getGoogleId());
HibernateUtil.commitTransaction();
}
}

0 comments on commit 3562d31

Please sign in to comment.