diff --git a/.github/workflows/load_test.yml b/.github/workflows/load_test.yml index 4a45b8029..7c93ce19b 100644 --- a/.github/workflows/load_test.yml +++ b/.github/workflows/load_test.yml @@ -31,7 +31,7 @@ jobs: - name: Build the otel-daemon run: make build-otel-daemon - # TODO: write logs to a file in src/test_results for archival + # TODO: write logs to a file in src/testlog for archival - name: Run the otel-daemon run: make otel-daemon @@ -40,7 +40,7 @@ jobs: with: go-version-file: src/go.mod - - run: mkdir test_results + - run: mkdir ${{ github.workspace }}/testlog # Install gotestfmt - name: Set up gotestfmt @@ -55,7 +55,7 @@ jobs: AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} CORSO_LOAD_TESTS: true - CORSO_LOG_FILE: ${{ github.workspace }}/test_results/run-load.log + CORSO_LOG_FILE: ${{ github.workspace }}/testlog/run-load.log CORSO_M365_LOAD_TEST_USER_ID: ${{ secrets.CORSO_M365_LOAD_TEST_USER_ID }} CORSO_M365_LOAD_TEST_ORG_USERS: ${{ secrets.CORSO_M365_LOAD_TEST_ORG_USERS }} CORSO_PASSPHRASE: ${{ secrets.CORSO_PASSPHRASE }} @@ -73,9 +73,9 @@ jobs: -memprofile=mem.prof \ -mutexprofile=mutex.prof \ -trace=trace.out \ - -outputdir=test_results \ + -outputdir=testlog \ ./pkg/repository/repository_load_test.go \ - 2>&1 | tee ./test_results/gotest-load.log | gotestfmt -hide successful-tests + 2>&1 | tee ${{ github.workspace }}/testlog/gotest-load.log | gotestfmt -hide successful-tests # generate new entries to roll into the next load test # only runs if the test was successful @@ -110,7 +110,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: load-test-profiling - path: src/test_results/* + path: ${{ github.workspace }}/testlog/* if-no-files-found: error retention-days: 14 diff --git a/.github/workflows/sanity-test.yaml b/.github/workflows/sanity-test.yaml index 7a8e110f1..9e210778d 100644 --- a/.github/workflows/sanity-test.yaml +++ b/.github/workflows/sanity-test.yaml @@ -38,7 +38,6 @@ jobs: CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log RESTORE_DEST_PFX: Corso_Test_Sanity_ - TEST_RESULT: test_results TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }} defaults: @@ -60,7 +59,6 @@ jobs: - run: go build -o corso - run: go build -o sanity-test ./cmd/sanity_test - - run: mkdir ${TEST_RESULT} - run: mkdir ${CORSO_LOG_DIR} ########################################################################################################################################## @@ -123,9 +121,9 @@ jobs: --hide-progress \ --prefix $prefix \ --bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \ - 2>&1 | tee ./testlogs/gotest-repo-init.log + 2>&1 | tee ${{ env.CORSO_LOG_DIR }}/gotest-repo-init.log - if ! grep -q 'Initialized a S3 repository within bucket' ./$TEST_RESULT/gotest-repo-init.log + if ! grep -q 'Initialized a S3 repository within bucket' ${{ env.CORSO_LOG_DIR }}/gotest-repo-init.log then echo "Repo could not be initialized" exit 1 @@ -142,9 +140,9 @@ jobs: --hide-progress \ --prefix ${{ steps.repo-init.outputs.result }} \ --bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \ - 2>&1 | tee ./testlogs/gotest-repo-connect.log + 2>&1 | tee ${{ env.CORSO_LOG_DIR }}/gotest-repo-connect.log - if ! grep -q 'Connected to S3 bucket' ./testlogs/gotest-repo-connect.log + if ! grep -q 'Connected to S3 bucket' ${{ env.CORSO_LOG_DIR }}/gotest-repo-connect.log then echo "Repo could not be connected" exit 1 diff --git a/.gitignore b/.gitignore index 911d91a10..3f0ba69bf 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,5 @@ /docker/bin /website/dist -*/test_results/** \ No newline at end of file +*/test_results/** +*/testlog/** \ No newline at end of file diff --git a/src/Makefile b/src/Makefile index 74119b3d9..519f86f68 100644 --- a/src/Makefile +++ b/src/Makefile @@ -37,7 +37,7 @@ build-otel-daemon: docker build -t xray-daemon . otel-daemon: - results_dir=$$PWD/test_results; \ + results_dir=$$PWD/testlog; \ cd ./testfiles/otel_daemon; \ docker run \ -d \ @@ -51,7 +51,7 @@ otel-daemon: --log-level debug local-daemon: - results_dir=$$PWD/test_results; \ + results_dir=$$PWD/testlog; \ cd ./testfiles/otel_daemon; \ docker run \ --attach STDOUT \ @@ -78,7 +78,7 @@ load-test: -memprofile=mem.prof \ -mutexprofile=mutex.prof \ -trace=trace.out \ - -outputdir=test_results \ + -outputdir=testlog \ ./pkg/repository/loadtest/repository_load_test.go getM365: