Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import com.google.api.client.json.GenericJson;
import com.google.common.collect.ImmutableList;
import com.google.firebase.FirebaseApp;
import com.google.firebase.database.ChildEventListener;
Expand Down Expand Up @@ -66,7 +65,9 @@ public static void setUpClass() {

@AfterClass
public static void tearDownClass() throws IOException {
uploadRules(masterApp, "{\"rules\": {\".read\": true, \".write\": true}}");
uploadRules(
masterApp,
"{\"rules\": {\".read\": \"auth != null\", \".write\": \"auth != null\"}}");
}

@Before
Expand All @@ -81,7 +82,8 @@ public void checkAndCleanupApp() {

private static String formatRules(DatabaseReference ref, String rules) {
return String.format(
"{\"rules\": {\".read\": true, \".write\": true, \"%s\": %s}}", ref.getKey(), rules);
"{\"rules\": {\".read\": \"auth != null\", \".write\": \"auth != null\", \"%s\": %s}}",
ref.getKey(), rules);
}

private static void uploadRules(FirebaseApp app, String rules) throws IOException {
Expand Down Expand Up @@ -922,7 +924,7 @@ public void onComplete(DatabaseError error, DatabaseReference ref) {

@Test
public void testStartAtAndEndAtOnValueIndex()
throws InterruptedException, ExecutionException, TimeoutException, TestFailure, IOException {
throws InterruptedException, ExecutionException, TimeoutException, TestFailure {
DatabaseReference ref = IntegrationTestUtils.getRandomNode(masterApp) ;

Map<String, Object> initial =
Expand Down Expand Up @@ -982,7 +984,7 @@ public void onChildAdded(DataSnapshot snapshot, String previousChildName) {

@Test
public void testRemovingDefaultListener()
throws InterruptedException, ExecutionException, TimeoutException, TestFailure, IOException {
throws InterruptedException, ExecutionException, TimeoutException, TestFailure {
DatabaseReference ref = IntegrationTestUtils.getRandomNode(masterApp) ;

Object initialData = MapBuilder.of("key", "value");
Expand Down