Remove client-side BL auth validation
These checks are now performed on the server, and logic to fail
unauthenticated tests is built into the returned remote configuration.
bug:126442904
Test: run gts -m GtsPlacementTestCases (rm auth file first)
Change-Id: Ic8ad877b0b012d1da2eb7bb6b919a72e21e77a55
diff --git a/common/device-side/util/src/com/android/compatibility/common/util/BusinessLogicTestCase.java b/common/device-side/util/src/com/android/compatibility/common/util/BusinessLogicTestCase.java
index 29607c3..b0c1dbb 100644
--- a/common/device-side/util/src/com/android/compatibility/common/util/BusinessLogicTestCase.java
+++ b/common/device-side/util/src/com/android/compatibility/common/util/BusinessLogicTestCase.java
@@ -19,19 +19,17 @@
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.rules.TestName;
-
import android.app.Instrumentation;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.util.Log;
-import java.lang.reflect.Field;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.rules.TestName;
+
import java.io.File;
-import java.util.List;
+import java.lang.reflect.Field;
import java.util.Map;
/**
@@ -51,7 +49,6 @@
@Before
public void handleBusinessLogic() {
loadBusinessLogic();
- ensureAuthenticated();
executeBusinessLogic();
}
@@ -80,27 +77,6 @@
}
}
- protected void ensureAuthenticated() {
- if (!mCanReadBusinessLogic) {
- // super class handles the condition that the service is unavailable.
- return;
- }
-
- if (!mBusinessLogic.mConditionalTestsEnabled) {
- skipTest("Execution of device specific tests is not enabled. "
- + "Enable with '--conditional-business-logic-tests-enabled'");
- }
-
- if (mBusinessLogic.isAuthorized()) {
- // Run test as normal.
- return;
- }
- String message = mBusinessLogic.getAuthenticationStatusMessage();
-
- // Fail test since request was not authorized.
- failTest(String.format("Unable to execute because %s.", message));
- }
-
protected static Instrumentation getInstrumentation() {
return InstrumentationRegistry.getInstrumentation();
}