Skip to content

Commit

Permalink
feat: remove godog configuration (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlorgal authored Feb 28, 2021
1 parent 751a980 commit 9018bff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
15 changes: 4 additions & 11 deletions cfg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ package cfg

// Config contains the configuration for golium project.
type Config struct {
Suite string `yaml:"suite" envconfig:"SUITE"`
Environment string `yaml:"environment" envconfig:"ENVIRONMENT"`
Godog GodogConfig `yaml:"godog"`
Dir DirConfig `yaml:"dir"`
Log LogConfig `yaml:"log"`
}

// GodogConfig to configure godog
type GodogConfig struct {
Format string `yaml:"format" envconfig:"GODOG_FORMAT"`
Concurrency int `yaml:"concurrency" envconfig:"GODOG_CONCURRENCY"`
Suite string `yaml:"suite" envconfig:"SUITE"`
Environment string `yaml:"environment" envconfig:"ENVIRONMENT"`
Dir DirConfig `yaml:"dir"`
Log LogConfig `yaml:"log"`
}

// DirConfig to configure some configuration directories.
Expand Down
4 changes: 0 additions & 4 deletions cfg/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ package cfg
var DefaultConfig = Config{
Suite: "golium",
Environment: "local",
Godog: GodogConfig{
Format: "pretty",
Concurrency: 1,
},
Dir: DirConfig{
Config: "./",
Schemas: "./schemas",
Expand Down
4 changes: 1 addition & 3 deletions launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ func (l *Launcher) Launch(testSuiteInitializer func(context.Context, *godog.Test
scenarioInitializer func(context.Context, *godog.ScenarioContext)) {
conf := GetConfig()
godogOpts := godog.Options{
Format: conf.Godog.Format,
Output: colors.Colored(os.Stdout),
Concurrency: conf.Godog.Concurrency,
Output: colors.Colored(os.Stdout),
}
godog.BindFlags("godog.", flag.CommandLine, &godogOpts)
flag.Parse()
Expand Down

0 comments on commit 9018bff

Please sign in to comment.