diff --git a/doc/tcr.md b/doc/tcr.md index cfc5fbac..0426bac1 100644 --- a/doc/tcr.md +++ b/doc/tcr.md @@ -21,7 +21,6 @@ tcr [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -h, --help help for tcr -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") @@ -29,6 +28,7 @@ tcr [flags] -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_check.md b/doc/tcr_check.md index 34608d47..05e6a56f 100644 --- a/doc/tcr_check.md +++ b/doc/tcr_check.md @@ -49,13 +49,13 @@ tcr check [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_config.md b/doc/tcr_config.md index bc4431da..d19fc509 100644 --- a/doc/tcr_config.md +++ b/doc/tcr_config.md @@ -27,13 +27,13 @@ tcr config [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_config_reset.md b/doc/tcr_config_reset.md index c55891b0..b0e977a8 100644 --- a/doc/tcr_config_reset.md +++ b/doc/tcr_config_reset.md @@ -27,13 +27,13 @@ tcr config reset [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_config_save.md b/doc/tcr_config_save.md index 35ad6b25..212ac416 100644 --- a/doc/tcr_config_save.md +++ b/doc/tcr_config_save.md @@ -27,13 +27,13 @@ tcr config save [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_config_show.md b/doc/tcr_config_show.md index d6a9c53a..d86b9f3d 100644 --- a/doc/tcr_config_show.md +++ b/doc/tcr_config_show.md @@ -27,13 +27,13 @@ tcr config show [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_info.md b/doc/tcr_info.md index ea5b20e8..a9f7da92 100644 --- a/doc/tcr_info.md +++ b/doc/tcr_info.md @@ -27,13 +27,13 @@ tcr info [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_log.md b/doc/tcr_log.md index 4282eb23..e38c9597 100644 --- a/doc/tcr_log.md +++ b/doc/tcr_log.md @@ -35,13 +35,13 @@ tcr log [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_mob.md b/doc/tcr_mob.md index e2677144..fb263a56 100644 --- a/doc/tcr_mob.md +++ b/doc/tcr_mob.md @@ -27,13 +27,13 @@ tcr mob [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_one-shot.md b/doc/tcr_one-shot.md index 526993d0..24cd6dbc 100644 --- a/doc/tcr_one-shot.md +++ b/doc/tcr_one-shot.md @@ -38,13 +38,13 @@ tcr one-shot [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_solo.md b/doc/tcr_solo.md index 2aecc9dc..8d0c52d5 100644 --- a/doc/tcr_solo.md +++ b/doc/tcr_solo.md @@ -27,13 +27,13 @@ tcr solo [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_stats.md b/doc/tcr_stats.md index da27b4da..997ea944 100644 --- a/doc/tcr_stats.md +++ b/doc/tcr_stats.md @@ -55,13 +55,13 @@ tcr stats [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/doc/tcr_web.md b/doc/tcr_web.md index 5c6c30f9..76da34cd 100644 --- a/doc/tcr_web.md +++ b/doc/tcr_web.md @@ -33,13 +33,13 @@ tcr web [flags] -F, --commit-failures enable committing reverts on tests failure -c, --config-dir string indicate the directory where TCR configuration is stored (default: current directory) -d, --duration duration set the duration for role rotation countdown timer - -f, --flavor string indicate the flavor to be used by TCR: nice (default) or original -l, --language string indicate the programming language to be used by TCR -m, --message-suffix string indicate text to append at the end of TCR commit messages (ex: "[#1234]") -o, --polling duration set VCS polling period when running as navigator -P, --port-number int indicate port number used by TCR HTTP server in web mode (experimental) (default: 8483) -t, --toolchain string indicate the toolchain to be used by TCR -T, --trace string indicate trace options. Recognized values: none (default), vcs or http + -r, --variant string indicate the variant to be used by TCR: nice (default) or original -V, --vcs string indicate the VCS (version control system) to be used by TCR: git (default) or p4 -w, --work-dir string indicate the directory from which TCR is running (default: current directory) ``` diff --git a/src/cli/terminal_ui.go b/src/cli/terminal_ui.go index 1f153558..22a428a5 100644 --- a/src/cli/terminal_ui.go +++ b/src/cli/terminal_ui.go @@ -334,7 +334,7 @@ func (term *TerminalUI) ShowSessionInfo() { term.printInfo("Work Directory: ", info.WorkDir) term.printInfo("Language=", info.LanguageName, ", Toolchain=", info.ToolchainName) term.printVCSInfo(info) - term.printFlavor(info) + term.printVariant(info) term.printMessageSuffix(info.MessageSuffix) } @@ -353,8 +353,8 @@ func (term *TerminalUI) printVCSInfo(info engine.SessionInfo) { } } -func (term *TerminalUI) printFlavor(info engine.SessionInfo) { - term.printInfo("Flavor is ", info.Flavor) +func (term *TerminalUI) printVariant(info engine.SessionInfo) { + term.printInfo("Variant is ", info.Variant) } func (term *TerminalUI) printMessageSuffix(suffix string) { diff --git a/src/cli/terminal_ui_test.go b/src/cli/terminal_ui_test.go index d08f535d..2d933a51 100644 --- a/src/cli/terminal_ui_test.go +++ b/src/cli/terminal_ui_test.go @@ -512,7 +512,7 @@ func Test_show_session_info(t *testing.T) { asCyanTrace("Work Directory: fake") + asCyanTrace("Language=fake, Toolchain=fake") + asYellowTrace("VCS \"fake\" is unknown") + - asCyanTrace("Flavor is nice") + asCyanTrace("Variant is nice") assert.Equal(t, expected, capturer.CaptureStdout(func() { term, _, _ := terminalSetup(*params.AParamSet()) diff --git a/src/config/param_flavor.go b/src/config/param_variant.go similarity index 83% rename from src/config/param_flavor.go rename to src/config/param_variant.go index 19c24133..2d85eeae 100644 --- a/src/config/param_flavor.go +++ b/src/config/param_variant.go @@ -26,19 +26,19 @@ import ( "github.com/spf13/cobra" ) -// AddFlavorParam adds flavor parameter to the provided command -func AddFlavorParam(cmd *cobra.Command) *StringParam { +// AddVariantParam adds variant parameter to the provided command +func AddVariantParam(cmd *cobra.Command) *StringParam { param := StringParam{ s: paramSettings{ viperSettings: viperSettings{ enabled: true, keyPath: "config.tcr", - name: "flavor", + name: "variant", }, cobraSettings: cobraSettings{ - name: "flavor", - shorthand: "f", - usage: "indicate the flavor to be used by TCR: nice (default) or original", + name: "variant", + shorthand: "r", + usage: "indicate the variant to be used by TCR: nice (default) or original", persistent: true, }, }, diff --git a/src/config/tcr_config.go b/src/config/tcr_config.go index d45d57ae..185eb4d2 100644 --- a/src/config/tcr_config.go +++ b/src/config/tcr_config.go @@ -46,7 +46,7 @@ type TcrConfig struct { PollingPeriod *DurationParam MobTimerDuration *DurationParam AutoPush *BoolParam - Flavor *StringParam + Variant *StringParam CommitFailures *BoolParam VCS *StringParam MessageSuffix *StringParam @@ -60,7 +60,7 @@ func (c TcrConfig) reset() { c.PollingPeriod.reset() c.MobTimerDuration.reset() c.AutoPush.reset() - c.Flavor.reset() + c.Variant.reset() c.CommitFailures.reset() c.VCS.reset() c.MessageSuffix.reset() @@ -202,7 +202,7 @@ func AddParameters(cmd *cobra.Command, defaultDir string) { Config.PollingPeriod = AddPollingPeriodParam(cmd) Config.MobTimerDuration = AddMobTimerDurationParam(cmd) Config.AutoPush = AddAutoPushParam(cmd) - Config.Flavor = AddFlavorParam(cmd) + Config.Variant = AddVariantParam(cmd) Config.CommitFailures = AddCommitFailuresParam(cmd) Config.VCS = AddVCSParam(cmd) Config.MessageSuffix = AddMessageSuffixParam(cmd) @@ -220,7 +220,7 @@ func UpdateEngineParams(p *params.Params) { p.Toolchain = Config.Toolchain.GetValue() p.PollingPeriod = Config.PollingPeriod.GetValue() p.AutoPush = Config.AutoPush.GetValue() - p.Flavor = Config.Flavor.GetValue() + p.Variant = Config.Variant.GetValue() p.CommitFailures = Config.CommitFailures.GetValue() p.VCS = Config.VCS.GetValue() p.MessageSuffix = Config.MessageSuffix.GetValue() diff --git a/src/config/tcr_config_test.go b/src/config/tcr_config_test.go index 69c690d1..8e75b23c 100644 --- a/src/config/tcr_config_test.go +++ b/src/config/tcr_config_test.go @@ -241,10 +241,10 @@ func Test_show_tcr_config_with_default_values(t *testing.T) { fmt.Sprintf("%v.git.commit-failures: %v", prefix, false), fmt.Sprintf("%v.git.polling-period: %v", prefix, 2*time.Second), fmt.Sprintf("%v.mob-timer.duration: %v", prefix, 5*time.Minute), - fmt.Sprintf("%v.tcr.flavor: %v", prefix, "nice"), fmt.Sprintf("%v.tcr.language: %v", prefix, ""), fmt.Sprintf("%v.tcr.toolchain: %v", prefix, ""), fmt.Sprintf("%v.tcr.trace: %v", prefix, "none"), + fmt.Sprintf("%v.tcr.variant: %v", prefix, "nice"), fmt.Sprintf("%v.vcs.name: %v", prefix, "git"), } utils.AssertSimpleTrace(t, expected, diff --git a/src/engine/session_info.go b/src/engine/session_info.go index 552b33e7..fcfa525d 100644 --- a/src/engine/session_info.go +++ b/src/engine/session_info.go @@ -31,7 +31,7 @@ type SessionInfo struct { VCSName string VCSSessionSummary string CommitOnFail bool - Flavor string + Variant string GitAutoPush bool MessageSuffix string } diff --git a/src/engine/tcr.go b/src/engine/tcr.go index 6180e145..aecba66b 100644 --- a/src/engine/tcr.go +++ b/src/engine/tcr.go @@ -58,7 +58,7 @@ type ( ToggleAutoPush() SetAutoPush(flag bool) SetCommitOnFail(flag bool) - SetFlavor(flavor string) + SetVariant(variant string) GetCurrentRole() role.Role RunAsDriver() RunAsNavigator() @@ -93,7 +93,7 @@ type ( // before starting a new one roleMutex sync.Mutex commitOnFail bool - flavor string + variant string messageSuffix string // shoot channel is used for handling interruptions coming from the UI shoot chan bool @@ -108,8 +108,8 @@ type ( } ) -func (tcr *TCREngine) SetFlavor(flavor string) { - tcr.flavor = flavor +func (tcr *TCREngine) SetVariant(variant string) { + tcr.variant = variant } const traceReporterWaitingTime = 100 * time.Millisecond @@ -181,7 +181,7 @@ func (tcr *TCREngine) Init(p params.Params) { tcr.vcs.EnableAutoPush(p.AutoPush) tcr.SetCommitOnFail(p.CommitFailures) - tcr.SetFlavor(p.Flavor) + tcr.SetVariant(p.Variant) tcr.setMobTimerDuration(p.MobTurnDuration) tcr.ui.ShowRunningMode(tcr.mode) @@ -685,7 +685,7 @@ func (tcr *TCREngine) GetSessionInfo() SessionInfo { VCSSessionSummary: tcr.vcs.SessionSummary(), GitAutoPush: tcr.vcs.IsAutoPushEnabled(), CommitOnFail: tcr.commitOnFail, - Flavor: tcr.flavor, + Variant: tcr.variant, MessageSuffix: tcr.messageSuffix, } } diff --git a/src/engine/tcr_test.go b/src/engine/tcr_test.go index ff3388b2..795c101d 100644 --- a/src/engine/tcr_test.go +++ b/src/engine/tcr_test.go @@ -366,7 +366,7 @@ func initTCREngineWithFakes( params.WithMobTimerDuration(p.MobTurnDuration), params.WithAutoPush(p.AutoPush), params.WithCommitFailures(p.CommitFailures), - params.WithFlavor(p.Flavor), + params.WithVariant(p.Variant), params.WithPollingPeriod(p.PollingPeriod), params.WithRunMode(p.Mode), params.WithVCS(p.VCS), @@ -466,20 +466,20 @@ func Test_set_commit_on_fail(t *testing.T) { } } -func Test_set_flavor(t *testing.T) { +func Test_set_variant(t *testing.T) { var tcr TCRInterface testFlags := []struct { - desc string - flavor string + desc string + variant string }{ - {"Nice Flavor", "nice"}, - {"Original Flavor", "original"}, + {"Nice Variant", "nice"}, + {"Original Variant", "original"}, } for _, tt := range testFlags { t.Run(tt.desc, func(t *testing.T) { tcr, _ = initTCREngineWithFakes(nil, nil, nil, nil) - tcr.SetFlavor(tt.flavor) - assert.Equal(t, tt.flavor, tcr.GetSessionInfo().Flavor) + tcr.SetVariant(tt.variant) + assert.Equal(t, tt.variant, tcr.GetSessionInfo().Variant) }) } } @@ -536,7 +536,7 @@ func Test_get_session_info(t *testing.T) { ToolchainName: "fake-toolchain", VCSName: fake.Name, VCSSessionSummary: "VCS session \"" + fake.Name + "\"", - Flavor: "nice", + Variant: "nice", GitAutoPush: false, } assert.Equal(t, expected, tcr.GetSessionInfo()) diff --git a/src/engine/tcr_test_fake.go b/src/engine/tcr_test_fake.go index 58097168..d54cf275 100644 --- a/src/engine/tcr_test_fake.go +++ b/src/engine/tcr_test_fake.go @@ -79,7 +79,7 @@ func NewFakeTCREngine() *FakeTCREngine { VCSSessionSummary: "VCS session \"fake\"", GitAutoPush: false, CommitOnFail: false, - Flavor: "nice", + Variant: "nice", }, } } diff --git a/src/http/api/session_info.go b/src/http/api/session_info.go index 1a2a2cbd..2b782838 100644 --- a/src/http/api/session_info.go +++ b/src/http/api/session_info.go @@ -35,7 +35,7 @@ type sessionInfo struct { VCSName string `json:"vcsName"` VCSSessionSummary string `json:"vcsSession"` CommitOnFail bool `json:"commitOnFail"` - Flavor string `json:"flavor"` + Variant string `json:"variant"` GitAutoPush bool `json:"gitAutoPush"` MessageSuffix string `json:"messageSuffix"` } @@ -52,7 +52,7 @@ func SessionInfoGetHandler(c *gin.Context) { VCSName: info.VCSName, VCSSessionSummary: info.VCSSessionSummary, CommitOnFail: info.CommitOnFail, - Flavor: info.Flavor, + Variant: info.Variant, GitAutoPush: info.GitAutoPush, MessageSuffix: info.MessageSuffix, } diff --git a/src/http/api/session_info_test.go b/src/http/api/session_info_test.go index 229baf1b..1091a161 100644 --- a/src/http/api/session_info_test.go +++ b/src/http/api/session_info_test.go @@ -57,7 +57,7 @@ func Test_session_info_get_handler(t *testing.T) { VCSName: info.VCSName, VCSSessionSummary: info.VCSSessionSummary, CommitOnFail: info.CommitOnFail, - Flavor: info.Flavor, + Variant: info.Variant, GitAutoPush: info.GitAutoPush, MessageSuffix: info.MessageSuffix, } diff --git a/src/params/params.go b/src/params/params.go index 58f644e8..55b9f85d 100644 --- a/src/params/params.go +++ b/src/params/params.go @@ -36,7 +36,7 @@ type Params struct { Toolchain string MobTurnDuration time.Duration AutoPush bool - Flavor string + Variant string CommitFailures bool PollingPeriod time.Duration Mode runmode.RunMode diff --git a/src/params/params_test_data_builder.go b/src/params/params_test_data_builder.go index d202d5fe..47c12709 100644 --- a/src/params/params_test_data_builder.go +++ b/src/params/params_test_data_builder.go @@ -39,7 +39,7 @@ func AParamSet(builders ...func(params *Params)) *Params { Toolchain: "", MobTurnDuration: 0, AutoPush: false, - Flavor: "nice", + Variant: "nice", PollingPeriod: 0, Mode: runmode.OneShot{}, VCS: "git", @@ -108,10 +108,10 @@ func WithAutoPush(value bool) func(params *Params) { } } -// WithFlavor sets the provided value as the flavor to be used -func WithFlavor(flavor string) func(params *Params) { +// WithVariant sets the provided value as the variant to be used +func WithVariant(variant string) func(params *Params) { return func(params *Params) { - params.Flavor = flavor + params.Variant = variant } } diff --git a/webapp/src/app/components/tcr-session-info/tcr-session-info.component.html b/webapp/src/app/components/tcr-session-info/tcr-session-info.component.html index eb091f72..3735d13c 100644 --- a/webapp/src/app/components/tcr-session-info/tcr-session-info.component.html +++ b/webapp/src/app/components/tcr-session-info/tcr-session-info.component.html @@ -77,7 +77,7 @@