Skip to content

Commit

Permalink
skip enycption migration to speed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
githengi committed Dec 2, 2020
1 parent ffa31d5 commit 83ca260
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.robolectric.annotation.Config;
import org.smartregister.reveal.shadow.AsyncTaskShadow;
import org.smartregister.reveal.shadow.CloudantDataHandlerShadowUtils;
import org.smartregister.reveal.shadow.CoreLibraryShadow;
import org.smartregister.reveal.shadow.CustomFontTextViewShadow;
import org.smartregister.reveal.shadow.GeoJsonSourceShadow;
import org.smartregister.reveal.shadow.KujakuMapViewShadow;
Expand All @@ -33,7 +34,7 @@
MapViewShadow.class, KujakuMapViewShadow.class, RevealMapViewShadow.class,
LayerShadow.class, SymbolLayerShadow.class, LineLayerShadow.class,
GeoJsonSourceShadow.class, SourceShadow.class, OfflineManagerShadow.class,
AsyncTaskShadow.class, CloudantDataHandlerShadowUtils.class}, sdk = Build.VERSION_CODES.P)
AsyncTaskShadow.class, CloudantDataHandlerShadowUtils.class, CoreLibraryShadow.class}, sdk = Build.VERSION_CODES.P)
public abstract class BaseUnitTest {

@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ public void onCreate() {
mInstance = this;
context = Context.getInstance();
context.updateApplicationContext(getApplicationContext());
SyncConfiguration syncConfiguration = spy(new RevealSyncConfiguration());
when(syncConfiguration.runPlanEvaluationOnClientProcessing()).thenReturn(false);
CoreLibrary.init(context, syncConfiguration);

CoreLibrary.init(context);
ConfigurableViewsLibrary.init(context);

FamilyLibrary.init(context, getMetadata(), BuildConfig.VERSION_CODE, BuildConfig.DATABASE_VERSION);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.smartregister.reveal.shadow;

import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.smartregister.CoreLibrary;

/**
* Created by samuelgithengi on 12/2/20.
*/
@Implements(CoreLibrary.class)
public class CoreLibraryShadow {

@Implementation
private static void checkPlatformMigrations() {
//do nothing
}
}

0 comments on commit 83ca260

Please sign in to comment.