-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows us to use a recording **without connecting to any actual asset**. Assuming you have made a previous recording via e.g. ```bash cnquery scan local -f examples/os.mql.yaml --record recording.json ``` You can now use that recording with the `mock` provider in a few different ways: **1. Executing scans:** ```bash cnquery scan mock -f examples/os.mql.yaml --use-recording recording.json ``` **2. Running commands:** ```bash cnquery run mock --use-recording recording.json -c sshd.config.params ``` **3. Opening a shell:** ```bash cnquery shell mock --use-recording recording.json ``` A few follow-ups and notes: 1. The current `providers/mock` will be removed. It is now replaced by this runner. A few tests still depend on it. 2. This was only implemented for a few providers (`core` and `os`), more will be migrated to support this. 3. No provider can claim the mock connector or connection type. Mock is a builtin functionality that goes hand in hand with recording. Signed-off-by: Dominik Richter <[email protected]>
- Loading branch information
Showing
18 changed files
with
363 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.