Skip to content

Commit

Permalink
Add comments wherever necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek3255 committed Feb 26, 2024
1 parent 278f7e4 commit 282abcd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/java/io/supertokens/test/CoreConfigListAPITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ public void testProtectedConfigsAreHandledCorrectlyIfSuperTokensSaaSSecretIsSet(
String[] protectedPluginFields = StorageLayer.getBaseStorage(process.main)
.getProtectedConfigsFromSuperTokensSaaSUsers();

// Make sure that the protected fields are not included in the response
// if supertokens_saas_secret is set and it is not used for api_key
{
JsonObject response = HttpRequestForTesting.sendJsonRequest(process.getProcess(), "",
"http://localhost:3567/core-config/list",
Expand All @@ -127,6 +129,8 @@ public void testProtectedConfigsAreHandledCorrectlyIfSuperTokensSaaSSecretIsSet(
}
}

// Make sure that the protected fields are included in the response
// if supertokens_saas_secret is set and it is used for the api_key
{
JsonObject response = HttpRequestForTesting.sendJsonRequest(process.getProcess(), "",
"http://localhost:3567/core-config/list",
Expand All @@ -149,7 +153,7 @@ public void testProtectedConfigsAreHandledCorrectlyIfSuperTokensSaaSSecretIsSet(
}

if (allProtectedFields.size() > 0) {
fail("Protected configs " + allProtectedFields + " are not included in the response even though supertokens_saas_secret is added in the request.");
fail("Protected configs " + allProtectedFields.toString() + " are not included in the response even though supertokens_saas_secret is added in the request.");
}
}

Expand Down

0 comments on commit 282abcd

Please sign in to comment.