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
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

View File

@ -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

1
.gitignore vendored
View File

@ -29,3 +29,4 @@
/website/dist
*/test_results/**
*/testlog/**

View File

@ -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: