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

botにテストシナリオ追加 #76

Merged
merged 3 commits into from
Dec 25, 2023
Merged

botにテストシナリオ追加 #76

merged 3 commits into from
Dec 25, 2023

Conversation

makiuchi-d
Copy link
Member

MsgClientPropと再入室のシナリオを追加しました。

go testでテストシナリオを流せるようにしました。
カバレッジをみてシナリオの網羅性を確認できます:

cd server/cmd/wsnet2-bot/cmd

docker run -d --rm \
  -v `pwd`/../../../sql/10-schema.sql:/docker-entrypoint-initdb.d/10-schema.sql \
  -v `pwd`/../../../sql/90-docker.sql:/docker-entrypoint-initdb.d/90-docker.sql \
  -e MYSQL_ROOT_PASSWORD=root \
  -e MYSQL_DATABASE=wsnet2 \
  -e MYSQL_USER=wsnet2 \
  -e MYSQL_PASSWORD=wsnet2pass \
  -p 3306:3306 mysql:8.0

go test . -cover -coverprofile=cover.out -tags scenariocoverage \
  -coverpkg=wsnet2/auth,wsnet2/binary,wsnet2/common,wsnet2/config,wsnet2/game,wsnet2/game/service,wsnet2/hub,wsnet2/hub/service,wsnet2/lobby,wsnet2/lobby/service,wsnet2/log,wsnet2/pb

go tool cover -html=cover.out -o cover.html

@makiuchi-d makiuchi-d requested a review from methane December 20, 2023 14:19
@makiuchi-d makiuchi-d merged commit 2a29b88 into main Dec 25, 2023
4 checks passed
@makiuchi-d makiuchi-d deleted the bot-scenario branch December 25, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants