Skip to content

Commit

Permalink
remove unused set_zenko_client_action
Browse files Browse the repository at this point in the history
remove dispatch of setZenkoClient to avoid error when uploading object.
  • Loading branch information
JeanMarcMilletScality committed Sep 4, 2024
1 parent c253c84 commit 40e56d9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 37 deletions.
8 changes: 0 additions & 8 deletions src/react/actions/__tests__/utils/dispatchActionsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ export const SET_MANAGEMENT_CLIENT_ACTION: SetManagementClientAction = {
//@ts-expect-error fix this when you are working on it
managementClient: new MockManagementClient(),
};
export function SET_ZENKO_CLIENT_ACTION(
zenkoClient: ZenkoClientInterface,
): SetZenkoClientAction {
return {
type: 'SET_ZENKO_CLIENT',
zenkoClient,
};
}
export const SET_STS_CLIENT_ACTION: SetSTSClientAction = {
type: 'SET_STS_CLIENT',
stsClient: new MockSTSClient(),
Expand Down
8 changes: 0 additions & 8 deletions src/react/actions/__tests__/zenko.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,7 @@ describe.skip('zenko actions', () => {
SignedUrl: '',
},
];
const mock = new MockZenkoClient();
const syncTests = [
{
it: 'should return SET_ZENKO_CLIENT action',
//@ts-expect-error fix this when you are working on it
fn: actions.setZenkoClient(mock),
//@ts-expect-error fix this when you are working on it
expectedActions: [dispatchAction.SET_ZENKO_CLIENT_ACTION(mock)],
},
{
it: 'should return ZENKO_CLEAR_ERROR action',
fn: actions.zenkoClearError(),
Expand Down
11 changes: 0 additions & 11 deletions src/react/actions/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
handleErrorMessage,
loadInstanceLatestStatus,
networkAuthFailure,
setZenkoClient,
} from './index';
export function setOIDCLogout(logout: OidcLogoutFunction): SetOIDCLogoutAction {
return {
Expand Down Expand Up @@ -84,16 +83,6 @@ export function loadAppConfig(config: AppConfig, user): ThunkNonStateAction {
}),
),
);
dispatch(
setZenkoClient(
new ZenkoClient(
config.zenkoEndpoint,
config.iamInternalFQDN,
config.s3InternalFQDN,
config.basePath,
),
),
);
dispatch(loadConfigSuccess());
dispatch(loadClients());
return Promise.resolve();
Expand Down
10 changes: 0 additions & 10 deletions src/react/actions/zenko.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
DispatchFunction,
GetStateFunction,
SetZenkoClientAction,
ThunkNonStatePromisedAction,
ThunkStatePromisedAction,
ZenkoAppendSearchListAction,
Expand All @@ -15,7 +14,6 @@ import {
SearchResultList,
Site,
ZenkoClientError,
ZenkoClient as ZenkoClientInterface,
} from '../../types/zenko';
import { ListObjectVersionsOutput } from 'aws-sdk/clients/s3';
import { handleAWSClientError, handleAWSError } from './error';
Expand Down Expand Up @@ -74,14 +72,6 @@ export function appendSearchListing(
list,
};
}
export function setZenkoClient(
zenkoClient: ZenkoClientInterface,
): SetZenkoClientAction {
return {
type: 'SET_ZENKO_CLIENT',
zenkoClient,
};
}

function _isFolder(key: string): boolean {
return key.substr(key.length - 1) === '/';
Expand Down

0 comments on commit 40e56d9

Please sign in to comment.