This PR provides new tests for the process of reading from binary files (DLT, Pcapng, Pcap legacy), then parsing with (DLT, SomeIP, DLT and SomeIP) parsers, then writing the output to Chipmunk temporary directory. By reading those temp files and having a snapshot for them as a reference to compare to of future changes.
The crate insta is used to handle snapshot testing. It's preferred to be used with its CLI tool cargo-insta.
Output files will be read and represented as serializable struct which is written to the snapshot files via yaml format (The suggested format by insta crate) because it's clear to when diffing the snapshots
Integration of the tool are built into Build CLI Tool with the option to accept all the changes at once. However, using cargo insta provides more benefits with colored diffs and reviewing each item snapshot at once.
CI checks adjusted accordingly by adding CI environment flag as needed for insta crate.
Documentation is added to the test file directly to make it easier to find for developers when tests are failing.
Small fix to creating tmp directory in case .chipmunk directory doesn't exist has been added.
Update: This PR provides missing updates in Cargo.lock files in master
This PR provides new tests for the process of reading from binary files (DLT, Pcapng, Pcap legacy), then parsing with (DLT, SomeIP, DLT and SomeIP) parsers, then writing the output to Chipmunk temporary directory. By reading those temp files and having a snapshot for them as a reference to compare to of future changes.
insta
crate) because it's clear to when diffing the snapshotscargo insta
provides more benefits with colored diffs and reviewing each item snapshot at once.insta
crate.tmp
directory in case.chipmunk
directory doesn't exist has been added.Update: This PR provides missing updates in
Cargo.lock
files in master