@@ -3,27 +3,11 @@ import { times } from 'lodash';
3
3
import * as td from 'testdouble' ;
4
4
5
5
import {
6
- ASSIGNMENT_TEST_DATA_DIR ,
7
- getTestAssignments ,
8
- IAssignmentTestCase ,
9
6
MOCK_UFC_RESPONSE_FILE ,
10
- OBFUSCATED_MOCK_UFC_RESPONSE_FILE ,
11
- readMockUfcConfiguration ,
12
- readMockUfcObfuscatedConfiguration ,
13
7
readMockUFCResponse ,
14
- SubjectTestCase ,
15
- testCasesByFileName ,
16
- validateTestAssignments ,
17
8
} from '../../test/testHelpers' ;
18
9
import { IAssignmentLogger } from '../assignment-logger' ;
19
10
import { AssignmentCache } from '../cache/abstract-assignment-cache' ;
20
- import { ConfigurationStore } from '../configuration-store' ;
21
- import { MemoryOnlyConfigurationStore } from '../configuration-store/memory.store' ;
22
- import {
23
- IConfigurationWire ,
24
- IObfuscatedPrecomputedConfigurationResponse ,
25
- ObfuscatedPrecomputedConfigurationResponse ,
26
- } from '../configuration-wire/configuration-wire-types' ;
27
11
import {
28
12
MAX_EVENT_QUEUE_SIZE ,
29
13
DEFAULT_BASE_POLLING_INTERVAL_MS ,
@@ -32,12 +16,10 @@ import {
32
16
import { decodePrecomputedFlag } from '../decoding' ;
33
17
import { Flag , ObfuscatedFlag , VariationType , FormatEnum , Variation } from '../interfaces' ;
34
18
import { getMD5Hash } from '../obfuscation' ;
35
- import { AttributeType } from '../types' ;
36
19
37
20
import EppoClient , { checkTypeMatch } from './eppo-client' ;
38
21
import { Configuration } from '../configuration' ;
39
- import { IUniversalFlagConfigResponse } from '../http-client' ;
40
- import { ISyncStore } from '../configuration-store/configuration-store' ;
22
+ import { KVStore , MemoryStore } from '../kvstore' ;
41
23
42
24
// Use a known salt to produce deterministic hashes
43
25
const salt = base64 . fromUint8Array ( new Uint8Array ( [ 7 , 53 , 17 , 78 ] ) ) ;
@@ -748,12 +730,6 @@ describe('EppoClient E2E test', () => {
748
730
} ) ;
749
731
750
732
it ( 'Does not fetch configurations if the configuration store is unexpired' , async ( ) => {
751
- class MockStore < T > extends MemoryOnlyConfigurationStore < T > {
752
- async isExpired ( ) : Promise < boolean > {
753
- return false ;
754
- }
755
- }
756
-
757
733
// Test needs network fetching approach
758
734
client = new EppoClient ( {
759
735
sdkKey : requestConfiguration . apiKey ,
@@ -953,11 +929,11 @@ describe('EppoClient E2E test', () => {
953
929
describe ( 'flag overrides' , ( ) => {
954
930
let client : EppoClient ;
955
931
let mockLogger : IAssignmentLogger ;
956
- let overrideStore : ISyncStore < Variation > ;
932
+ let overrideStore : KVStore < Variation > ;
957
933
958
934
beforeEach ( ( ) => {
959
935
mockLogger = td . object < IAssignmentLogger > ( ) ;
960
- overrideStore = new MemoryOnlyConfigurationStore < Variation > ( ) ;
936
+ overrideStore = new MemoryStore < Variation > ( ) ;
961
937
client = new EppoClient ( {
962
938
sdkKey : 'test' ,
963
939
sdkName : 'test' ,
0 commit comments