File tree Expand file tree Collapse file tree 2 files changed +0
-54
lines changed
src/route-handlers/describe-cluster Expand file tree Collapse file tree 2 files changed +0
-54
lines changed Original file line number Diff line number Diff line change @@ -38,42 +38,6 @@ describe('describeCluster', () => {
38
38
} )
39
39
) ;
40
40
} ) ;
41
-
42
- it ( 'returns static response with advancedVisibilityEnabled true when CADENCE_ADVANCED_VISIBILITY env value is true' , async ( ) => {
43
- const originalEnvObj = globalThis . process . env ;
44
- globalThis . process . env = {
45
- ...process . env ,
46
- CADENCE_ADVANCED_VISIBILITY : 'true' ,
47
- } ;
48
-
49
- const { res, mockDescribeCluster } = await setup ( { } ) ;
50
-
51
- expect ( mockDescribeCluster ) . not . toHaveBeenCalled ( ) ;
52
-
53
- const responseJson = await res . json ( ) ;
54
- expect (
55
- responseJson . persistenceInfo . visibilityStore . features [ 0 ] . enabled
56
- ) . toBe ( true ) ;
57
- globalThis . process . env = originalEnvObj ;
58
- } ) ;
59
-
60
- it ( 'returns static response with advancedVisibilityEnabled false when CADENCE_ADVANCED_VISIBILITY env value is not true' , async ( ) => {
61
- const originalEnvObj = globalThis . process . env ;
62
- globalThis . process . env = {
63
- ...process . env ,
64
- CADENCE_ADVANCED_VISIBILITY : 'not true' ,
65
- } ;
66
-
67
- const { res, mockDescribeCluster } = await setup ( { } ) ;
68
-
69
- expect ( mockDescribeCluster ) . not . toHaveBeenCalled ( ) ;
70
-
71
- const responseJson = await res . json ( ) ;
72
- expect (
73
- responseJson . persistenceInfo . visibilityStore . features [ 0 ] . enabled
74
- ) . toBe ( false ) ;
75
- globalThis . process . env = originalEnvObj ;
76
- } ) ;
77
41
} ) ;
78
42
79
43
async function setup ( { error } : { error ?: true } ) {
Original file line number Diff line number Diff line change @@ -19,24 +19,6 @@ export async function describeCluster(
19
19
) {
20
20
const decodedParams = decodeUrlParams ( requestParams . params ) as RouteParams ;
21
21
22
- // temporary solution to disable invoking describeCluster
23
- if ( process . env . CADENCE_ADVANCED_VISIBILITY ) {
24
- const res = {
25
- persistenceInfo : {
26
- visibilityStore : {
27
- features : [
28
- {
29
- key : 'advancedVisibilityEnabled' ,
30
- enabled : process . env . CADENCE_ADVANCED_VISIBILITY === 'true' ,
31
- } ,
32
- ] ,
33
- } ,
34
- } ,
35
- supportedClientVersions : null ,
36
- } ;
37
- return NextResponse . json ( res ) ;
38
- }
39
-
40
22
try {
41
23
const res = await ctx . grpcClusterMethods . describeCluster ( {
42
24
name : decodedParams . cluster ,
You can’t perform that action at this time.
0 commit comments