Skip to content

Commit

Permalink
Fix value for process.hash.sha256 draggable (#72142)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski authored Jul 17, 2020
1 parent 5cd1f6e commit 6164037
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { BrowserFields } from '../../../../../../common/containers/source';
import { mockBrowserFields } from '../../../../../../common/containers/source/mock';
import '../../../../../../common/mock/match_media';
import { mockTimelineData, TestProviders } from '../../../../../../common/mock';
import { mockEndgameCreationEvent } from '../../../../../../common/mock/mock_endgame_ecs_data';
import { SystemGenericFileDetails, SystemGenericFileLine } from './generic_file_details';
import { useMountAppended } from '../../../../../../common/utils/use_mount_appended';

Expand Down Expand Up @@ -61,6 +62,23 @@ describe('SystemGenericFileDetails', () => {
'Evan@zeek-london[generic-text-123](6278)with resultfailureSource128.199.212.120'
);
});

test('it passes string value for processHashSha256', () => {
const wrapper = mount(
<TestProviders>
<SystemGenericFileDetails
contextId="[contextid-123]"
text="[generic-text-123]"
browserFields={mockBrowserFields}
data={mockEndgameCreationEvent}
timelineId="test"
/>
</TestProviders>
);
expect(wrapper.find('SystemGenericFileLine').prop('processHashSha256')).toEqual(
'd4c97ed46046893141652e2ec0056a698f6445109949d7fcabbce331146889ee'
);
});
});

describe('#SystemGenericFileLine', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const SystemGenericFileDetails = React.memo<GenericDetailsProps>(
const packageVersion: string | null | undefined = get('system.audit.package.version[0]', data);
const processHashMd5: string | null | undefined = get('process.hash.md5[0]', data);
const processHashSha1: string | null | undefined = get('process.hash.sha1[0]', data);
const processHashSha256: string | null | undefined = get('process.hash.sha256', data);
const processHashSha256: string | null | undefined = get('process.hash.sha256[0]', data);
const processPid: number | null | undefined = get('process.pid[0]', data);
const processPpid: number | null | undefined = get('process.ppid[0]', data);
const processName: string | null | undefined = get('process.name[0]', data);
Expand Down

0 comments on commit 6164037

Please sign in to comment.