Skip to content

Commit

Permalink
Add TestArtifactOnFailureStr
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Sep 10, 2024
1 parent f03af14 commit 1d8d5b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tools/citool/cmd/filter_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func filterTests(allTests []CITestConf, workflow, testType, ids string, envresol

if workflowMatch && typeMatch && idMatch {
test.IDSanitized = sanitizeTestID(test.ID)
test.TestArtifactOnFailureStr = strings.Join(test.TestArtifactOnFailure, "\n")
filteredTests = append(filteredTests, test)
}
if envresolve {
Expand Down Expand Up @@ -72,6 +73,7 @@ func filterAndMergeTests(allTests []CITestConf, workflow, testType, base64Tests
test.TestEnvVars[k] = v
}
test.IDSanitized = sanitizeTestID(test.ID)
test.TestArtifactOnFailureStr = strings.Join(test.TestArtifactOnFailure, "\n")
filteredTests = append(filteredTests, test)
}
if envresolve {
Expand Down
3 changes: 2 additions & 1 deletion tools/citool/cmd/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ type CITestConf struct {
TestConfigOverridePath string `yaml:"test_config_override_path" json:"test_config_override_path"`
TestSecretsRequired bool `yaml:"test_secrets_required" json:"test_secrets_required"`
TestEnvVars map[string]string `yaml:"test_env_vars" json:"test_env_vars"`
TestArtifactOnFailure []string `yaml:"test_artifacts_on_failure" json:"test_artifacts_on_failure"`
TestArtifactOnFailure []string `yaml:"test_artifacts_on_failure" json:"-"`
TestArtifactOnFailureStr string `json:"test_artifacts_on_failure"` // TestArtifactOnFailure in string format with new lines to be used in Github Actions
RemoteRunnerMemory string `yaml:"remote_runner_memory" json:"remote_runner_memory"`
PyroscopeEnv string `yaml:"pyroscope_env" json:"pyroscope_env"`
Workflows []string `yaml:"workflows" json:"workflows"`
Expand Down

0 comments on commit 1d8d5b5

Please sign in to comment.