Merge pull request #216 from lonnblad/bugfix/failing-cucumber-test-on-go1.11

Added an extra fixture for cucumber when using go1.11
Этот коммит содержится в:
Jayson Smith 2020-02-08 12:02:07 -07:00 коммит произвёл GitHub
родитель 873daf7d5f 321e28ab50
коммит cd0c830004
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 4610 добавлений и 3 удалений

4592
fixtures/cucumber_output_go111.json Обычный файл

Различия файлов не показаны, т.к. их слишком много Показать различия

7
fixtures/fixtures.go Обычный файл
Просмотреть файл

@ -0,0 +1,7 @@
// +build go1.12
package fixtures
const OutputFilenameProgress = "fixtures/progress_output.txt"
const OutputFilenameJUnit = "fixtures/junit_output.xml"
const OutputFilenameCucumber = "fixtures/cucumber_output.json"

7
fixtures/fixtures_go111.go Обычный файл
Просмотреть файл

@ -0,0 +1,7 @@
// +build !go1.12
package fixtures
const OutputFilenameProgress = "fixtures/progress_output.txt"
const OutputFilenameJUnit = "fixtures/junit_output.xml"
const OutputFilenameCucumber = "fixtures/cucumber_output_go111.json"

Просмотреть файл

@ -10,6 +10,7 @@ import (
"testing"
"github.com/cucumber/godog/colors"
"github.com/cucumber/godog/fixtures"
"github.com/cucumber/godog/gherkin"
)
@ -284,9 +285,9 @@ type succeedRunTestCase struct {
func TestSucceedRun(t *testing.T) {
testCases := []succeedRunTestCase{
{format: "progress", concurrency: 4, filename: "fixtures/progress_output.txt"},
{format: "junit", concurrency: 4, filename: "fixtures/junit_output.xml"},
{format: "cucumber", concurrency: 2, filename: "fixtures/cucumber_output.json"},
{format: "progress", concurrency: 4, filename: fixtures.OutputFilenameProgress},
{format: "junit", concurrency: 4, filename: fixtures.OutputFilenameJUnit},
{format: "cucumber", concurrency: 2, filename: fixtures.OutputFilenameCucumber},
}
for _, tc := range testCases {