Skip to content

Commit

Permalink
Make config value optional
Browse files Browse the repository at this point in the history
  • Loading branch information
NSeydoux committed Jul 5, 2024
1 parent 18a73f3 commit 0a5a527
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public class AccessGrantScenarios {
.getOptionalValue("inrupt.test.auth-method", String.class)
.orElse("client_secret_basic");

private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE =
config.getValue("inrupt.test.error-description.feature", Boolean.class);
private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE = config
.getOptionalValue("inrupt.test.error-description.feature", Boolean.class)
.orElse(false);

protected static String ACCESS_GRANT_PROVIDER;
protected static final String GRANT_MODE_READ = "Read";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ public class ApplicationRequestMetadataScenarios {
.orElse("client_secret_basic");
private static final String CLIENT_ID = config.getValue("inrupt.test.client-id", String.class);
private static final String CLIENT_SECRET = config.getValue("inrupt.test.client-secret", String.class);
private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE =
config.getValue("inrupt.test.error-description.feature", Boolean.class);
private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE = config
.getOptionalValue("inrupt.test.error-description.feature", Boolean.class)
.orElse(false);


private static final String FOLDER_SEPARATOR = "/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ public class AuthenticationScenarios {
.getOptionalValue("inrupt.test.auth-method", String.class)
.orElse("client_secret_basic");

private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE =
config.getValue("inrupt.test.error-description.feature", Boolean.class);
private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE = config
.getOptionalValue("inrupt.test.error-description.feature", Boolean.class)
.orElse(false);
private static SolidSyncClient localAuthClient;

@BeforeAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ public class DomainModulesResource {
private static final String CLIENT_SECRET = config.getValue("inrupt.test.client-secret", String.class);
private static final String FOLDER_SEPARATOR = "/";
private static URI publicContainerURI;
private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE =
config.getValue("inrupt.test.error-description.feature", Boolean.class);
private static final Boolean INRUPT_TEST_ERROR_DESCRIPTION_FEATURE = config
.getOptionalValue("inrupt.test.error-description.feature", Boolean.class)
.orElse(false);

private static SolidSyncClient localAuthClient;

Expand Down

0 comments on commit 0a5a527

Please sign in to comment.