mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
fix: missing omitempty on 2 of the new fields (#1389)
* fix: missing omitempty on 2 of the new fields * fix: Rename TS_WORKSPACE_DIR to TS_OUTPUT_DIR --------- Co-authored-by: Evans Mungai <evans@replicated.com>
This commit is contained in:
committed by
GitHub
parent
f6373f3e36
commit
bc4856869e
@@ -1389,8 +1389,6 @@ spec:
|
||||
required:
|
||||
- args
|
||||
- command
|
||||
- ignoreParentEnvs
|
||||
- inheritEnvs
|
||||
type: object
|
||||
subnetAvailable:
|
||||
properties:
|
||||
|
||||
@@ -1389,8 +1389,6 @@ spec:
|
||||
required:
|
||||
- args
|
||||
- command
|
||||
- ignoreParentEnvs
|
||||
- inheritEnvs
|
||||
type: object
|
||||
subnetAvailable:
|
||||
properties:
|
||||
|
||||
@@ -11720,8 +11720,6 @@ spec:
|
||||
required:
|
||||
- args
|
||||
- command
|
||||
- ignoreParentEnvs
|
||||
- inheritEnvs
|
||||
type: object
|
||||
subnetAvailable:
|
||||
properties:
|
||||
|
||||
@@ -10,7 +10,7 @@ spec:
|
||||
# this is for demonstration purpose only -- you probably don't want to drop your input to the bundle!
|
||||
args:
|
||||
- "-c"
|
||||
- "cat $TS_INPUT_DIR/dummy.yaml > $TS_WORKSPACE_DIR/dummy_content.yaml"
|
||||
- "cat $TS_INPUT_DIR/dummy.yaml > $TS_OUTPUT_DIR/dummy_content.yaml"
|
||||
outputDir: "myCommandOutputs"
|
||||
env:
|
||||
- AWS_REGION=us-west-1
|
||||
@@ -23,7 +23,7 @@ spec:
|
||||
dummy.conf: |-
|
||||
[hello]
|
||||
hello = 1
|
||||
|
||||
|
||||
[bye]
|
||||
bye = 2
|
||||
dummy.yaml: |-
|
||||
|
||||
@@ -185,8 +185,8 @@ type HostRun struct {
|
||||
OutputDir string `json:"outputDir,omitempty" yaml:"outputDir,omitempty"`
|
||||
Input map[string]string `json:"input,omitempty" yaml:"input,omitempty"`
|
||||
Env []string `json:"env,omitempty" yaml:"env,omitempty"`
|
||||
InheritEnvs []string `json:"inheritEnvs" yaml:"inheritEnvs,omitempty"`
|
||||
IgnoreParentEnvs bool `json:"ignoreParentEnvs" yaml:"ignoreParentEnvs,omitempty"`
|
||||
InheritEnvs []string `json:"inheritEnvs,omitempty" yaml:"inheritEnvs,omitempty"`
|
||||
IgnoreParentEnvs bool `json:"ignoreParentEnvs,omitempty" yaml:"ignoreParentEnvs,omitempty"`
|
||||
}
|
||||
|
||||
type HostCollect struct {
|
||||
|
||||
@@ -80,7 +80,7 @@ func (c *CollectHostRun) Collect(progressChan chan<- interface{}) (map[string][]
|
||||
return nil, errors.New(fmt.Sprintf("failed to create dir for: %s", runHostCollector.OutputDir))
|
||||
}
|
||||
cmd.Env = append(cmd.Env,
|
||||
fmt.Sprintf("TS_WORKSPACE_DIR=%s", cmdOutputTempDir),
|
||||
fmt.Sprintf("TS_OUTPUT_DIR=%s", cmdOutputTempDir),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ func TestCollectHostRun_Collect(t *testing.T) {
|
||||
CollectorName: "my-cmd-with-output",
|
||||
},
|
||||
Command: "sh",
|
||||
Args: []string{"-c", "echo ${TS_INPUT_DIR}/dummy.conf > $TS_WORKSPACE_DIR/input-file.txt"},
|
||||
Args: []string{"-c", "echo ${TS_INPUT_DIR}/dummy.conf > $TS_OUTPUT_DIR/input-file.txt"},
|
||||
Input: map[string]string{
|
||||
"dummy.conf": "[hello]\nhello = 1",
|
||||
},
|
||||
|
||||
@@ -11472,9 +11472,7 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"args",
|
||||
"command",
|
||||
"ignoreParentEnvs",
|
||||
"inheritEnvs"
|
||||
"command"
|
||||
],
|
||||
"properties": {
|
||||
"args": {
|
||||
|
||||
Reference in New Issue
Block a user