summaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2021-10-27 09:54:06 +0300
committerPaul Buetow <pbuetow@mimecast.com>2021-10-27 09:54:06 +0300
commitd0492e3f63f86ce053f59362a55d23cf6397d526 (patch)
treeefe6668328b58db3e14d3b6c408295e0f3bf85dd /internal/config
parent7c927e7e6d913168798d245a7ceea32a9ca85643 (diff)
integration tests use separate ssh private key file
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/args.go52
-rw-r--r--internal/config/initializer.go2
2 files changed, 27 insertions, 27 deletions
diff --git a/internal/config/args.go b/internal/config/args.go
index 3d7ac7d..859166d 100644
--- a/internal/config/args.go
+++ b/internal/config/args.go
@@ -15,31 +15,31 @@ import (
// Args is a helper struct to summarize common client arguments.
type Args struct {
lcontext.LContext
- Arguments []string
- ConfigFile string
- ConnectionsPerCPU int
- Discovery string
- LogDir string
- Logger string
- LogLevel string
- Mode omode.Mode
- NoColor bool
- PrivateKeyPathFile string
- QueryStr string
- Quiet bool
- RegexInvert bool
- RegexStr string
- Serverless bool
- ServersStr string
- Spartan bool
- SSHAuthMethods []gossh.AuthMethod
- SSHBindAddress string
- SSHHostKeyCallback gossh.HostKeyCallback
- SSHPort int
- Timeout int
- TrustAllHosts bool
- UserName string
- What string
+ Arguments []string
+ ConfigFile string
+ ConnectionsPerCPU int
+ Discovery string
+ LogDir string
+ Logger string
+ LogLevel string
+ Mode omode.Mode
+ NoColor bool
+ QueryStr string
+ Quiet bool
+ RegexInvert bool
+ RegexStr string
+ SSHAuthMethods []gossh.AuthMethod
+ SSHBindAddress string
+ SSHHostKeyCallback gossh.HostKeyCallback
+ SSHPort int
+ SSHPrivateKeyPathFile string
+ Serverless bool
+ ServersStr string
+ Spartan bool
+ Timeout int
+ TrustAllHosts bool
+ UserName string
+ What string
}
func (a *Args) String() string {
@@ -56,7 +56,6 @@ func (a *Args) String() string {
sb.WriteString(fmt.Sprintf("%s:%v,", "Logger", a.Logger))
sb.WriteString(fmt.Sprintf("%s:%v,", "Mode", a.Mode))
sb.WriteString(fmt.Sprintf("%s:%v,", "NoColor", a.NoColor))
- sb.WriteString(fmt.Sprintf("%s:%v,", "PrivateKeyPathFile", a.PrivateKeyPathFile))
sb.WriteString(fmt.Sprintf("%s:%v,", "QueryStr", a.QueryStr))
sb.WriteString(fmt.Sprintf("%s:%v,", "Quiet", a.Quiet))
sb.WriteString(fmt.Sprintf("%s:%v,", "RegexInvert", a.RegexInvert))
@@ -64,6 +63,7 @@ func (a *Args) String() string {
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHAuthMethods", a.SSHAuthMethods))
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHBindAddress", a.SSHBindAddress))
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHHostKeyCallback", a.SSHHostKeyCallback))
+ sb.WriteString(fmt.Sprintf("%s:%v,", "SSHPrivateKeyPathFile", a.SSHPrivateKeyPathFile))
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHPort", a.SSHPort))
sb.WriteString(fmt.Sprintf("%s:%v,", "Serverless", a.Serverless))
sb.WriteString(fmt.Sprintf("%s:%v,", "ServersStr", a.ServersStr))
diff --git a/internal/config/initializer.go b/internal/config/initializer.go
index 936df8a..74d0289 100644
--- a/internal/config/initializer.go
+++ b/internal/config/initializer.go
@@ -82,7 +82,7 @@ func (in *initializer) transformConfig(sourceProcess source.Source, args *Args,
// There are some special options which can be set by environment variable.
func (in *initializer) readEnvironmentVars() {
- if Env("DTAIL_RUN_INTEGRATION_TESTS") {
+ if Env("DTAIL_INTEGRATION_TEST_RUN_MODE") {
os.Setenv("DTAIL_HOSTNAME_OVERRIDE", "integrationtest")
os.Setenv("DTAIL_SSH_KNOWN_HOSTS_FILE", "./known_hosts")
in.Server.HostKeyFile = "./ssh_host_key"