Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added ci for mockrecord and mocktest #1365

Merged
merged 11 commits into from
Feb 2, 2024
14 changes: 13 additions & 1 deletion .github/workflows/golang-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,21 @@ sudo kill $pid
sleep 5
done

# Start the gin-mongo app in test omde.
# Start the gin-mongo app in test mode.
sudo -E env PATH="$PATH" ./../../keployv2 test -c "./ginApp" --delay 7

# move keployv2 to /usr/local/bin/keploy
mv ./../../keployv2 /usr/local/bin/keploy

sed -i 's/<path for storing stubs>/\/home\/runner\/work\/keploy\/keploy\/samples-go\/gin-mongo/' main_test.go

# run in mockrecord mode
shivamsouravjha marked this conversation as resolved.
Show resolved Hide resolved
go test

sed -i 's/MOCK_RECORD/MOCK_TEST/' main_test.go
# run in mocktest mode
go test

# Get the test results from the testReport file.
report_file="./keploy/testReports/report-1.yaml"
test_status1=$(grep 'status:' "$report_file" | head -n 1 | awk '{print $2}')
Expand Down
Loading