@@ -66,9 +66,12 @@ describe("Infra Store", () => {
6666 describe ( "lambda_url" , ( ) => {
6767 test ( "test is cloud true" , ( ) => {
6868 const infra_store = useInfraStore ( )
69+ infra_store . init_microservices ( )
6970 useRuntimeConfig ( ) . public . SITE_BRANCH = "/test"
7071 useRuntimeConfig ( ) . public . PROJECT = "/project"
7172 infra_store . app_mode = appMode . appMode . CLOUD
73+ const geode_store = useGeodeStore ( )
74+ geode_store . $patch ( { protocol : "https" , port : 443 } )
7275 expect ( infra_store . lambda_url ) . toBe (
7376 "https://api.geode-solutions.com:443/test/project/createbackend" ,
7477 )
@@ -77,6 +80,7 @@ describe("Infra Store", () => {
7780 describe ( "status" , ( ) => {
7881 test ( "test geode false & viewer false" , ( ) => {
7982 const infra_store = useInfraStore ( )
83+ infra_store . init_microservices ( )
8084 const geode_store = useGeodeStore ( )
8185 const viewer_store = useViewerStore ( )
8286 geode_store . $patch ( { status : Status . NOT_CONNECTED } )
@@ -85,6 +89,7 @@ describe("Infra Store", () => {
8589 } )
8690 test ( "test geode true & viewer false" , ( ) => {
8791 const infra_store = useInfraStore ( )
92+ infra_store . init_microservices ( )
8893 const geode_store = useGeodeStore ( )
8994 const viewer_store = useViewerStore ( )
9095 geode_store . $patch ( { status : Status . CONNECTED } )
@@ -93,6 +98,7 @@ describe("Infra Store", () => {
9398 } )
9499 test ( "test geode false & viewer true" , ( ) => {
95100 const infra_store = useInfraStore ( )
101+ infra_store . init_microservices ( )
96102 const geode_store = useGeodeStore ( )
97103 const viewer_store = useViewerStore ( )
98104 geode_store . $patch ( { status : Status . NOT_CONNECTED } )
@@ -101,6 +107,7 @@ describe("Infra Store", () => {
101107 } )
102108 test ( "test geode true & viewer true" , ( ) => {
103109 const infra_store = useInfraStore ( )
110+ infra_store . init_microservices ( )
104111 const geode_store = useGeodeStore ( )
105112 const viewer_store = useViewerStore ( )
106113 geode_store . $patch ( { status : Status . CONNECTED } )
@@ -112,34 +119,38 @@ describe("Infra Store", () => {
112119 describe ( "is_busy" , ( ) => {
113120 test ( "test geode false & viewer false" , ( ) => {
114121 const infra_store = useInfraStore ( )
122+ infra_store . init_microservices ( )
115123 const geode_store = useGeodeStore ( )
116124 const viewer_store = useViewerStore ( )
117- geode_store . $patch ( { request_counter : 0 } )
118- viewer_store . $patch ( { request_counter : 0 } )
125+ geode_store . $patch ( { is_busy : false } )
126+ viewer_store . $patch ( { is_busy : false } )
119127 expect ( infra_store . microservices_busy ) . toBe ( false )
120128 } )
121129 test ( "test geode true & viewer false" , ( ) => {
122130 const infra_store = useInfraStore ( )
131+ infra_store . init_microservices ( )
123132 const geode_store = useGeodeStore ( )
124133 const viewer_store = useViewerStore ( )
125- geode_store . $patch ( { request_counter : 1 } )
126- viewer_store . $patch ( { request_counter : 0 } )
134+ geode_store . $patch ( { is_busy : true } )
135+ viewer_store . $patch ( { is_busy : false } )
127136 expect ( infra_store . microservices_busy ) . toBe ( true )
128137 } )
129138 test ( "test geode false & viewer true" , ( ) => {
130139 const infra_store = useInfraStore ( )
140+ infra_store . init_microservices ( )
131141 const geode_store = useGeodeStore ( )
132142 const viewer_store = useViewerStore ( )
133- geode_store . $patch ( { request_counter : 0 } )
134- viewer_store . $patch ( { request_counter : 1 } )
143+ geode_store . $patch ( { is_busy : false } )
144+ viewer_store . $patch ( { is_busy : true } )
135145 expect ( infra_store . microservices_busy ) . toBe ( true )
136146 } )
137147 test ( "test geode true & viewer true" , ( ) => {
138148 const infra_store = useInfraStore ( )
149+ infra_store . init_microservices ( )
139150 const geode_store = useGeodeStore ( )
140151 const viewer_store = useViewerStore ( )
141- geode_store . $patch ( { request_counter : 1 } )
142- viewer_store . $patch ( { request_counter : 1 } )
152+ geode_store . $patch ( { is_busy : true } )
153+ viewer_store . $patch ( { is_busy : true } )
143154 expect ( infra_store . microservices_busy ) . toBe ( true )
144155 } )
145156 } )
@@ -149,6 +160,7 @@ describe("Infra Store", () => {
149160 describe ( "create_backend" , ( ) => {
150161 test ( "test without end-point" , async ( ) => {
151162 const infra_store = useInfraStore ( )
163+ infra_store . init_microservices ( )
152164 const geode_store = useGeodeStore ( )
153165 const viewer_store = useViewerStore ( )
154166 await infra_store . create_backend ( )
0 commit comments