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/create handler edition test #1152

Merged
merged 34 commits into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1aff4bb
wip:とりあえずPostEditionまで仮実装(色々雑そう)
mathsuky Feb 10, 2025
8417135
fix:TestGetEditionsを既存の他のテストの記法に合わせて修正
mathsuky Feb 22, 2025
74eebfd
fix:TestPostEditionを加筆修正
mathsuky Feb 22, 2025
271f948
fix:変数名の修正
mathsuky Feb 22, 2025
4272f1c
fix:TestDeleteEditionを加筆修正
mathsuky Feb 23, 2025
8cedc39
fix:TestGetEditionを加筆修正
mathsuky Feb 23, 2025
84f9a08
fix:TestPatchEditionを加筆修正
mathsuky Feb 23, 2025
975947a
feat:エディションに紐づくゲームの取得テスト
mathsuky Feb 23, 2025
298613a
feat: PATCH/editions/{editionID}/games のテストを追加
mathsuky Feb 23, 2025
7a2d313
fix:lintで落ちている部分を修正
mathsuky Feb 24, 2025
5882026
ctrl.Finish()の削除
mathsuky Mar 3, 2025
dbdc68a
assert.ErrorAsを使う
mathsuky Mar 3, 2025
b50c186
fix:無意味な2秒を1秒に
mathsuky Mar 3, 2025
65f3662
fix:invalidURLをわかりやすく
mathsuky Mar 3, 2025
f5bd6da
fix:testの構造体の命名を変更
mathsuky Mar 3, 2025
c423861
修正漏れ
mathsuky Mar 3, 2025
4bc169c
fix: descriptionの誤り
mathsuky Mar 3, 2025
e9a5fbb
fix:変数で置き換える
mathsuky Mar 3, 2025
1e175d8
fix:t.Parallelを追加
mathsuky Mar 10, 2025
b197293
fix:サブテストの並列実行が落ちないように修正
mathsuky Mar 11, 2025
20ae599
fix:service.ErrDuplicateGameエラーのテストケース追加
mathsuky Mar 12, 2025
a140b3c
wip: defer ctrl.Finish()
mathsuky Mar 12, 2025
41c820a
Revert "wip: defer ctrl.Finish()"
mathsuky Mar 12, 2025
9de70cf
wip:テストが落ちないように
mathsuky Mar 12, 2025
358b9f9
fix:構造体のフィールドをリネーム
mathsuky Mar 12, 2025
8ffe1fa
依存関係の整理
mathsuky Mar 14, 2025
9ce2b58
go.mod際生成
mathsuky Mar 14, 2025
be32ea5
Merge remote-tracking branch 'origin/main' into feat/create-handler-e…
mathsuky Mar 14, 2025
4ba9fad
依存関係の整理
mathsuky Mar 14, 2025
9981b42
Revert "依存関係の整理"
mathsuky Mar 14, 2025
91adb58
fix:go.uber.orgのmockを使う
mathsuky Mar 14, 2025
2dd86c5
Merge remote-tracking branch 'origin/main' into feat/create-handler-e…
mathsuky Mar 21, 2025
5c220fa
fix:関数名の修正
mathsuky Mar 22, 2025
d18db43
Merge remote-tracking branch 'origin/main' into feat/create-handler-e…
mathsuky Mar 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/openapi/v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ paths:
- edition
security:
- AdminAuth: []
operationId: postEditionGame
operationId: patchEditionGame
requestBody:
content:
application/json:
Expand Down
58 changes: 29 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
module github.com/traPtitech/trap-collection-server

go 1.24
go 1.24.0

require (
github.com/aws/aws-sdk-go-v2 v1.36.3
github.com/aws/aws-sdk-go-v2/config v1.29.9
github.com/aws/aws-sdk-go-v2/credentials v1.17.62
github.com/cosmtrek/air v1.52.1
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.66
github.com/aws/aws-sdk-go-v2/service/s3 v1.78.2
github.com/cosmtrek/air v1.61.2
github.com/deepmap/oapi-codegen v1.16.3
github.com/dgraph-io/ristretto v0.2.0
github.com/getkin/kin-openapi v0.131.0
github.com/go-gormigrate/gormigrate/v2 v2.1.3
github.com/go-sql-driver/mysql v1.9.1
github.com/go-task/task/v3 v3.42.1
github.com/google/uuid v1.6.0
github.com/google/wire v0.6.0
github.com/gorilla/sessions v1.4.0
github.com/h2non/filetype v1.1.3
github.com/labstack/echo-contrib v0.17.2
github.com/labstack/echo/v4 v4.13.3
github.com/labstack/gommon v0.4.2
github.com/mazrean/formstream v1.1.2
github.com/ncw/swift/v2 v2.0.3
github.com/oapi-codegen/echo-middleware v1.0.2
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1
github.com/oapi-codegen/runtime v1.1.1
github.com/ory/dockertest/v3 v3.11.0
github.com/prometheus/client_golang v1.21.1
github.com/stretchr/testify v1.10.0
go.uber.org/mock v0.5.0
golang.org/x/mod v0.24.0
golang.org/x/sync v0.12.0
gorm.io/driver/mysql v1.5.7
gorm.io/gorm v1.25.12
gorm.io/plugin/prometheus v0.1.0
)

require (
Expand Down Expand Up @@ -55,22 +63,26 @@ require (
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect
github.com/aws/smithy-go v1.22.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bep/godartsass/v2 v2.3.2 // indirect
github.com/bep/golibsass v1.2.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chainguard-dev/git-urls v1.0.2 // indirect
github.com/cli/safeexec v1.0.1 // indirect
github.com/cloudflare/circl v1.6.0 // indirect
github.com/containerd/continuity v0.4.3 // indirect
github.com/creack/pty v1.1.24 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.11.4 // indirect
github.com/docker/cli v26.1.4+incompatible // indirect
github.com/docker/docker v27.1.1+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dominikbraun/graph v0.23.0 // indirect
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.18.0 // indirect
Expand All @@ -87,14 +99,21 @@ require (
github.com/gohugoio/hugo v0.139.4 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/subcommands v1.2.0 // indirect
github.com/gorilla/context v1.1.2 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-zglob v0.0.6 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
Expand All @@ -106,11 +125,16 @@ require (
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/opencontainers/runc v1.1.14 // indirect
github.com/opencontainers/runc v1.1.13 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/radovskyb/watcher v1.0.7 // indirect
github.com/sajari/fuzzy v1.0.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
Expand All @@ -121,6 +145,8 @@ require (
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/tdewolff/parse/v2 v2.7.15 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
Expand All @@ -134,31 +160,6 @@ require (
)

require (
github.com/aws/aws-sdk-go-v2/config v1.29.9
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.66
github.com/aws/aws-sdk-go-v2/service/s3 v1.78.2
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/go-gormigrate/gormigrate/v2 v2.1.3
github.com/go-sql-driver/mysql v1.9.1
github.com/google/subcommands v1.2.0 // indirect
github.com/gorilla/context v1.1.2 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/labstack/gommon v0.4.2
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.21.1
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/crypto v0.35.0 // indirect
golang.org/x/net v0.36.0 // indirect
golang.org/x/sys v0.31.0 // indirect
Expand All @@ -167,7 +168,6 @@ require (
golang.org/x/tools v0.27.0 // indirect
google.golang.org/protobuf v1.36.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/plugin/prometheus v0.1.0
)

tool go.uber.org/mock/mockgen
11 changes: 5 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ github.com/cloudflare/circl v1.6.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZ
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8=
github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/cosmtrek/air v1.52.1 h1:R+BiGX9tWJ36ENM0ZroaRkagKgIlCmy+8IGTvMyoDV4=
github.com/cosmtrek/air v1.52.1/go.mod h1:xILtq8JGIYwe++r/ib4PdhubiuKBmE1vutC49E+5A78=
github.com/cosmtrek/air v1.61.2 h1:F0IkTrmb5Uf0LVfroPKE4xVV9NeoEkuvks3X83B5Hqo=
github.com/cosmtrek/air v1.61.2/go.mod h1:yOz9vy7edZ75KRN9+Ofqwm3OU0wuv4Csc+ikMeZxxS8=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
Expand Down Expand Up @@ -514,8 +514,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
github.com/opencontainers/runc v1.1.14 h1:rgSuzbmgz5DUJjeSnw337TxDbRuqjs6iqQck/2weR6w=
github.com/opencontainers/runc v1.1.14/go.mod h1:E4C2z+7BxR7GHXp0hAY53mek+x49X1LjPNeMTfRGvOA=
github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs=
github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA=
github.com/ory/dockertest/v3 v3.11.0 h1:OiHcxKAvSDUwsEVh2BjxQQc/5EHz9n0va9awCtNGuyA=
github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4SB194iUDnUI=
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
Expand Down Expand Up @@ -624,9 +624,8 @@ github.com/tdewolff/minify/v2 v2.20.37 h1:Q97cx4STXCh1dlWDlNHZniE8BJ2EBL0+2b0n92
github.com/tdewolff/minify/v2 v2.20.37/go.mod h1:L1VYef/jwKw6Wwyk5A+T0mBjjn3mMPgmjjA688RNsxU=
github.com/tdewolff/parse/v2 v2.7.15 h1:hysDXtdGZIRF5UZXwpfn3ZWRbm+ru4l53/ajBRGpCTw=
github.com/tdewolff/parse/v2 v2.7.15/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52 h1:gAQliwn+zJrkjAHVcBEYW/RFvd2St4yYimisvozAYlA=
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
github.com/tetratelabs/wazero v1.8.2 h1:yIgLR/b2bN31bjxwXHD8a3d+BogigR952csSDdLYEv4=
github.com/tetratelabs/wazero v1.8.2/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
Expand Down
2 changes: 1 addition & 1 deletion src/handler/v2/edition.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (edition *Edition) GetEditionGames(ctx echo.Context, editionID openapi.Edit

// エディションのゲームの変更
// (PATCH /editions/{editionID}/games)
func (edition *Edition) PostEditionGame(c echo.Context, editionID openapi.EditionIDInPath) error {
func (edition *Edition) PatchEditionGame(c echo.Context, editionID openapi.EditionIDInPath) error {
var req openapi.PatchEditionGameRequest
err := c.Bind(&req)
if err != nil {
Expand Down
Loading
Loading