From 9018bff45b0ee8314c1be4974e6cb7689a9c79a9 Mon Sep 17 00:00:00 2001 From: Jorge Lorenzo Date: Sun, 28 Feb 2021 19:15:45 +0100 Subject: [PATCH] feat: remove godog configuration (#5) --- cfg/config.go | 15 ++++----------- cfg/default.go | 4 ---- launcher.go | 4 +--- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/cfg/config.go b/cfg/config.go index 41b196df..22f21988 100755 --- a/cfg/config.go +++ b/cfg/config.go @@ -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. diff --git a/cfg/default.go b/cfg/default.go index 3feffeaa..ce96f15c 100755 --- a/cfg/default.go +++ b/cfg/default.go @@ -19,10 +19,6 @@ package cfg var DefaultConfig = Config{ Suite: "golium", Environment: "local", - Godog: GodogConfig{ - Format: "pretty", - Concurrency: 1, - }, Dir: DirConfig{ Config: "./", Schemas: "./schemas", diff --git a/launcher.go b/launcher.go index 27120f57..98702be6 100755 --- a/launcher.go +++ b/launcher.go @@ -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()