Skip to content

Commit

Permalink
Add unit test to demo the use of duplicated dynamic log links
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed Jan 29, 2024
1 parent 1058d03 commit ea9fdac
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions flyteplugins/go/tasks/logs/logging_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,27 @@ func TestGetLogsForContainerInPod_Flyteinteractive(t *testing.T) {
},
nil,
},
{
"Flyteinteractive - multiple uses of the template (invalid use of ports in a URI)",
&LogConfig{
DynamicLogLinks: map[string]tasklog.TemplateURI{
"vscode": "https://abc.com:{{ .taskConfig.port }}:{{ .taskConfig.port}}",
},
},
&core.TaskTemplate{
Config: map[string]string{
"link_type": "vscode",
"port": "65535",
},
},
[]*core.TaskLog{
{
Uri: "https://abc.com:65535:65535",
MessageFormat: core.TaskLog_JSON,
Name: "vscode logs my-Suffix",
},
},
},
{
"Flyteinteractive disabled and K8s enabled and flyteinteractive config present in TaskTemplate",
&LogConfig{
Expand Down

0 comments on commit ea9fdac

Please sign in to comment.