Fix folders used for sanity-tests (#3493)

<!-- PR description-->

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2023-05-24 22:33:15 +05:30 committed by GitHub
parent a1264b302b
commit 87bdba0a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 16 deletions

View File

@ -31,7 +31,7 @@ jobs:
- name: Build the otel-daemon - name: Build the otel-daemon
run: make build-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 - name: Run the otel-daemon
run: make otel-daemon run: make otel-daemon
@ -40,7 +40,7 @@ jobs:
with: with:
go-version-file: src/go.mod go-version-file: src/go.mod
- run: mkdir test_results - run: mkdir ${{ github.workspace }}/testlog
# Install gotestfmt # Install gotestfmt
- name: Set up gotestfmt - name: Set up gotestfmt
@ -55,7 +55,7 @@ jobs:
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
CORSO_LOAD_TESTS: true 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_USER_ID: ${{ secrets.CORSO_M365_LOAD_TEST_USER_ID }}
CORSO_M365_LOAD_TEST_ORG_USERS: ${{ secrets.CORSO_M365_LOAD_TEST_ORG_USERS }} CORSO_M365_LOAD_TEST_ORG_USERS: ${{ secrets.CORSO_M365_LOAD_TEST_ORG_USERS }}
CORSO_PASSPHRASE: ${{ secrets.CORSO_PASSPHRASE }} CORSO_PASSPHRASE: ${{ secrets.CORSO_PASSPHRASE }}
@ -73,9 +73,9 @@ jobs:
-memprofile=mem.prof \ -memprofile=mem.prof \
-mutexprofile=mutex.prof \ -mutexprofile=mutex.prof \
-trace=trace.out \ -trace=trace.out \
-outputdir=test_results \ -outputdir=testlog \
./pkg/repository/repository_load_test.go \ ./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 # generate new entries to roll into the next load test
# only runs if the test was successful # only runs if the test was successful
@ -110,7 +110,7 @@ jobs:
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: load-test-profiling name: load-test-profiling
path: src/test_results/* path: ${{ github.workspace }}/testlog/*
if-no-files-found: error if-no-files-found: error
retention-days: 14 retention-days: 14

View File

@ -38,7 +38,6 @@ jobs:
CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log
RESTORE_DEST_PFX: Corso_Test_Sanity_ 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 }} TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }}
defaults: defaults:
@ -60,7 +59,6 @@ jobs:
- run: go build -o corso - run: go build -o corso
- run: go build -o sanity-test ./cmd/sanity_test - run: go build -o sanity-test ./cmd/sanity_test
- run: mkdir ${TEST_RESULT}
- run: mkdir ${CORSO_LOG_DIR} - run: mkdir ${CORSO_LOG_DIR}
########################################################################################################################################## ##########################################################################################################################################
@ -123,9 +121,9 @@ jobs:
--hide-progress \ --hide-progress \
--prefix $prefix \ --prefix $prefix \
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \ --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 then
echo "Repo could not be initialized" echo "Repo could not be initialized"
exit 1 exit 1
@ -142,9 +140,9 @@ jobs:
--hide-progress \ --hide-progress \
--prefix ${{ steps.repo-init.outputs.result }} \ --prefix ${{ steps.repo-init.outputs.result }} \
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \ --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 then
echo "Repo could not be connected" echo "Repo could not be connected"
exit 1 exit 1

3
.gitignore vendored
View File

@ -28,4 +28,5 @@
/docker/bin /docker/bin
/website/dist /website/dist
*/test_results/** */test_results/**
*/testlog/**

View File

@ -37,7 +37,7 @@ build-otel-daemon:
docker build -t xray-daemon . docker build -t xray-daemon .
otel-daemon: otel-daemon:
results_dir=$$PWD/test_results; \ results_dir=$$PWD/testlog; \
cd ./testfiles/otel_daemon; \ cd ./testfiles/otel_daemon; \
docker run \ docker run \
-d \ -d \
@ -51,7 +51,7 @@ otel-daemon:
--log-level debug --log-level debug
local-daemon: local-daemon:
results_dir=$$PWD/test_results; \ results_dir=$$PWD/testlog; \
cd ./testfiles/otel_daemon; \ cd ./testfiles/otel_daemon; \
docker run \ docker run \
--attach STDOUT \ --attach STDOUT \
@ -78,7 +78,7 @@ load-test:
-memprofile=mem.prof \ -memprofile=mem.prof \
-mutexprofile=mutex.prof \ -mutexprofile=mutex.prof \
-trace=trace.out \ -trace=trace.out \
-outputdir=test_results \ -outputdir=testlog \
./pkg/repository/loadtest/repository_load_test.go ./pkg/repository/loadtest/repository_load_test.go
getM365: getM365: