Skip to content

Commit a4a97e0

Browse files
authored
test: rename the fixtures directory to testdata (#517)
Test material now lives in testdata/ The Go toolchain gives testdata a defined meaning — package patterns, vet and the build all skip it — whereas fixtures/ was ours alone. chore(client): drop a commented-out spec load in the runtime tests Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent fb0e040 commit a4a97e0

5 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎client/runtime_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,6 @@ func TestRuntime_ChunkedResponse(t *testing.T) {
666666
return nil
667667
})
668668

669-
// specDoc, err := spec.Load("../../fixtures/codegen/todolist.simple.yml")
670669
hu, err := url.Parse(server.URL)
671670
require.NoError(t, err)
672671

‎middleware/context_test.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func assertAPIError(t *testing.T, wantCode int, err error) {
5959
}
6060

6161
func TestContentType_Issue264(t *testing.T) {
62-
swspec, err := loads.Spec("../fixtures/bugs/264/swagger.yml")
62+
swspec, err := loads.Spec("../testdata/bugs/264/swagger.yml")
6363
require.NoError(t, err)
6464

6565
api := untyped.NewAPI(swspec)
@@ -77,7 +77,7 @@ func TestContentType_Issue264(t *testing.T) {
7777
}
7878

7979
func TestContentType_Issue172(t *testing.T) {
80-
swspec, err := loads.Spec("../fixtures/bugs/172/swagger.yml")
80+
swspec, err := loads.Spec("../testdata/bugs/172/swagger.yml")
8181
require.NoError(t, err)
8282

8383
api := untyped.NewAPI(swspec)
@@ -102,7 +102,7 @@ func TestContentType_Issue172(t *testing.T) {
102102
}
103103

104104
func TestContentType_Issue174(t *testing.T) {
105-
swspec, err := loads.Spec("../fixtures/bugs/174/swagger.yml")
105+
swspec, err := loads.Spec("../testdata/bugs/174/swagger.yml")
106106
require.NoError(t, err)
107107

108108
api := untyped.NewAPI(swspec)
@@ -482,7 +482,7 @@ func TestContextBindValidRequest(t *testing.T) {
482482
}
483483

484484
func TestContextBindValidRequest_Issue174(t *testing.T) {
485-
spec, err := loads.Spec("../fixtures/bugs/174/swagger.yml")
485+
spec, err := loads.Spec("../testdata/bugs/174/swagger.yml")
486486
require.NoError(t, err)
487487

488488
api := untyped.NewAPI(spec)

0 commit comments

Comments
 (0)