|
1 | 1 | import { describe, expect, it } from 'vitest';
|
2 | 2 | import { getNamespace } from './get-namespace';
|
3 | 3 |
|
4 |
| -const temporalSystemNamespace = { |
5 |
| - namespaceInfo: { |
6 |
| - name: 'temporal-system', |
7 |
| - state: 'Registered', |
8 |
| - description: 'Temporal internal system namespace', |
9 |
| - |
10 |
| - data: {}, |
11 |
| - id: '32049b68-7872-4094-8e63-d0dd59896a83', |
12 |
| - }, |
13 |
| - config: { |
14 |
| - workflowExecutionRetentionTtl: '604800s', |
15 |
| - badBinaries: { |
16 |
| - binaries: {}, |
17 |
| - }, |
18 |
| - historyArchivalState: 'Disabled', |
19 |
| - historyArchivalUri: '', |
20 |
| - visibilityArchivalState: 'Disabled', |
21 |
| - visibilityArchivalUri: '', |
22 |
| - }, |
23 |
| - replicationConfig: { |
24 |
| - activeClusterName: 'active', |
25 |
| - clusters: [ |
26 |
| - { |
27 |
| - clusterName: 'active', |
28 |
| - }, |
29 |
| - ], |
30 |
| - state: 'Unspecified', |
31 |
| - }, |
32 |
| - failoverVersion: '0', |
33 |
| - isGlobalNamespace: false, |
34 |
| -}; |
35 |
| - |
36 | 4 | const canaryNamespace = {
|
37 | 5 | namespaceInfo: {
|
38 | 6 | name: 'canary',
|
@@ -97,20 +65,6 @@ const defaultNamespace = {
|
97 | 65 | isGlobalNamespace: false,
|
98 | 66 | };
|
99 | 67 |
|
100 |
| -const getSettings = ( |
101 |
| - defaultNamespace: string, |
102 |
| - showTemporalSystemNamespace: boolean, |
103 |
| -) => { |
104 |
| - return { |
105 |
| - auth: { |
106 |
| - enabled: false, |
107 |
| - options: ['organization', 'invitation', 'audience'], |
108 |
| - }, |
109 |
| - defaultNamespace, |
110 |
| - showTemporalSystemNamespace, |
111 |
| - }; |
112 |
| -}; |
113 |
| - |
114 | 68 | describe('getNamespace', () => {
|
115 | 69 | it('should return default namespace if no namespace given', () => {
|
116 | 70 | const namespaces = [defaultNamespace, canaryNamespace];
|
|
0 commit comments