forked from Qortal/qortal
Removed localAuthBypassEnabled override in unit tests.
Hopefully this will allow us to proactively catch any missing API keys in the future.
This commit is contained in:
parent
ea10eec926
commit
ff6ec83b1c
@ -2,10 +2,12 @@ package org.qortal.test.api;
|
|||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.qortal.api.resource.AdminResource;
|
import org.qortal.api.resource.AdminResource;
|
||||||
import org.qortal.repository.DataException;
|
import org.qortal.repository.DataException;
|
||||||
|
import org.qortal.settings.Settings;
|
||||||
import org.qortal.test.common.ApiCommon;
|
import org.qortal.test.common.ApiCommon;
|
||||||
import org.qortal.test.common.Common;
|
import org.qortal.test.common.Common;
|
||||||
|
|
||||||
@ -29,7 +31,10 @@ public class AdminApiTests extends ApiCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSummary() {
|
public void testSummary() throws IllegalAccessException {
|
||||||
|
// Set localAuthBypassEnabled to true, since we don't need to test authentication here
|
||||||
|
FieldUtils.writeField(Settings.getInstance(), "localAuthBypassEnabled", true, true);
|
||||||
|
|
||||||
assertNotNull(this.adminResource.summary("testApiKey"));
|
assertNotNull(this.adminResource.summary("testApiKey"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,5 @@
|
|||||||
"tempDataPath": "data-test/_temp",
|
"tempDataPath": "data-test/_temp",
|
||||||
"listsPath": "lists-test",
|
"listsPath": "lists-test",
|
||||||
"storagePolicy": "FOLLOWED_OR_VIEWED",
|
"storagePolicy": "FOLLOWED_OR_VIEWED",
|
||||||
"maxStorageCapacity": 104857600,
|
"maxStorageCapacity": 104857600
|
||||||
"localAuthBypassEnabled": true
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user