Skip to content

Commit 7745d7f

Browse files
committed
fix tests
1 parent 8843326 commit 7745d7f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

redisinsight/ui/src/slices/interfaces/instances.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface Instance extends DatabaseInstanceResponse {
3636
isDeleting?: boolean;
3737
sentinelMaster?: SentinelMasterDto;
3838
modules: RedisModuleDto[];
39-
isRediStack: boolean;
39+
isRediStack?: boolean;
4040
}
4141

4242
export enum ConnectionType {

redisinsight/ui/src/slices/tests/instances.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import reducer, {
3636
changeInstanceAliasFailure,
3737
changeInstanceAliasSuccess,
3838
changeInstanceAliasAction,
39+
resetConnectedInstance,
3940
} from '../instances'
4041
import { addErrorNotification, addMessageNotification, IAddInstanceErrorPayload } from '../app/notifications'
4142
import { ConnectionType, InitialStateInstances, Instance } from '../interfaces'
@@ -62,6 +63,7 @@ beforeEach(() => {
6263
password: null,
6364
connectionType: ConnectionType.Standalone,
6465
nameFromProvider: null,
66+
modules: [],
6567
lastConnection: new Date('2021-04-22T09:03:56.917Z'),
6668
},
6769
{
@@ -73,6 +75,7 @@ beforeEach(() => {
7375
password: null,
7476
connectionType: ConnectionType.Standalone,
7577
nameFromProvider: null,
78+
modules: [],
7679
tls: {
7780
verifyServerCert: true,
7881
caCertId: '70b95d32-c19d-4311-bb24-e684af12cf15',
@@ -89,6 +92,7 @@ beforeEach(() => {
8992
connectionType: ConnectionType.Sentinel,
9093
nameFromProvider: null,
9194
lastConnection: new Date('2021-04-22T18:40:44.031Z'),
95+
modules: [],
9296
endpoints: [
9397
{
9498
host: 'localhost',
@@ -670,6 +674,7 @@ describe('instances slice', () => {
670674
// Assert
671675
const expectedActions = [
672676
setDefaultInstance(),
677+
resetConnectedInstance(),
673678
setDefaultInstanceSuccess(),
674679
]
675680

@@ -702,6 +707,7 @@ describe('instances slice', () => {
702707
// Assert
703708
const expectedActions = [
704709
setDefaultInstance(),
710+
resetConnectedInstance(),
705711
setDefaultInstanceFailure(responsePayload.response.data.message),
706712
addErrorNotification(responsePayload as IAddInstanceErrorPayload),
707713
]

0 commit comments

Comments
 (0)