Skip to content

Commit

Permalink
Fix test get logs template uri test (#4760)
Browse files Browse the repository at this point in the history
* Fix common_operator_test by forcing UTC

Signed-off-by: Eduardo Apolinario <[email protected]>

* Lint

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario and eapolinario authored Jan 23, 2024
1 parent 5300e1b commit 41d6173
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flyteplugins/go/tasks/pluginmachinery/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func NewKubeClient(config *rest.Config, options Options) (core.KubeClient, error
if options.ClientOptions == nil {
options.ClientOptions = &client.Options{
HTTPClient: httpClient,
Mapper: mapper,
Mapper: mapper,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package common

import (
"fmt"
"os"
"testing"
"time"

Expand All @@ -18,6 +19,13 @@ import (
"github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core/mocks"
)

func TestMain(m *testing.M) {
// All tests should run assuming UTC timezone.
time.Local = time.UTC
code := m.Run()
os.Exit(code)
}

func TestExtractCurrentCondition(t *testing.T) {
jobCreated := commonOp.JobCondition{
Type: commonOp.JobCreated,
Expand Down

0 comments on commit 41d6173

Please sign in to comment.