Skip to content

Commit

Permalink
test: introduce flag for trace input to e2e framework (#1318)
Browse files Browse the repository at this point in the history
* Add json marshal/unmarshal for test traces

* Remove auto-generated trace files

* Add an example trace to see the input format

* Add comment in rapid test

* Remove duplicated test case

* Remove TODO in favor of comment

* Reduce code duplication

* Run go mod tidy and make format

* Correct testdata directory in gitignore

* Remove testdata directory

* Remove testdata from gitignore

* Add tracehandler_testdata

* Remove example trace, since there are examples in the test data

* Revert unintentional change to .gitignore

* Remove propType field from generator

* Add docstrings to action_rapid test and state_rapid_test to better explain what the files are doing

* Add flag for reading test traces

* Refactor testRun to testConfig and remove testConfig specification for predefined cases

* Remove ::testConfig from Makefile

* Re-add removed BUILDDIR instruction

* Re-add removed newline

* Fix duplicated words

* Checkout tracehandler testdata from main

* Remove unecessary test trace

* Commit merged file
  • Loading branch information
p-offtermatt authored Sep 27, 2023
1 parent 811675e commit d2c2950
Show file tree
Hide file tree
Showing 7 changed files with 301 additions and 164 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,17 @@ jobs:
go-version: "1.20"
- name: E2E tests
run: make test-e2e-short-cometmock
Trace-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: E2E tests
run: make test-trace
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ test-gaia-e2e-parallel-tagged:
test-no-cache:
go test ./... -count=1 && go run ./tests/e2e/...

# test reading a trace from a file
test-trace:
go run ./tests/e2e/... --test-file tests/e2e/tracehandler_testdata/happyPath.json::default

###############################################################################
### Linting ###
###############################################################################
Expand Down
Loading

0 comments on commit d2c2950

Please sign in to comment.