mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-05-16 22:26:44 +00:00
* Add unit tests for HTTP dissector
* Ignore some fields on test environment
* Remove Git patches
* Don't have indent in the expected JSONs
* Fix more issues and update expected JSONs
* Refactor the test environment lookup
* Add a Makefile
* Include HTTP tests into the CI
* Fix the linting errors
* Fix another linting error
* Update the expected JSONs
* Sort `PostData.Params` params as well
* Move expected JSONs into `expect/dissect`
* Add `TestAnalyze` method
* Add `TestRepresent` method
* Add `TestRegister`, `TestMacros` and `TestPing` methods
* Test extensions first
* Remove expected JSONs
* Remove `bin` directory and update `Makefile` rules
* Update `.gitignore`
* Fix skipping download functionality in the Makefile
* Run `go mod tidy`
* Fix the race condition in the tests
* Revert "Test extensions first"
This reverts commit b8350cf139.
* Make `TEST_UPDATE` env lookup one-liner
* Update .github/workflows/test.yml
Co-authored-by: gadotroee <55343099+gadotroee@users.noreply.github.com>
* Add a newline
* Replace `ls` with `find`
Co-authored-by: gadotroee <55343099+gadotroee@users.noreply.github.com>
58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'develop'
|
|
- 'main'
|
|
push: # needed to upload test coverage report to codecov
|
|
branches:
|
|
- 'develop'
|
|
- 'main'
|
|
|
|
concurrency:
|
|
group: mizu-tests-validation-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
run-unit-tests:
|
|
name: Unit Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.17
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.17'
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install libpcap
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get install libpcap-dev
|
|
|
|
- id: 'auth'
|
|
uses: 'google-github-actions/auth@v0'
|
|
with:
|
|
credentials_json: '${{ secrets.GCR_JSON_KEY }}'
|
|
|
|
- name: 'Set up Cloud SDK'
|
|
uses: 'google-github-actions/setup-gcloud@v0'
|
|
|
|
- name: CLI Test
|
|
run: make test-cli
|
|
|
|
- name: Agent Test
|
|
run: make test-agent
|
|
|
|
- name: Shared Test
|
|
run: make test-shared
|
|
|
|
- name: Extensions Test
|
|
run: make test-extensions
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|
|
|