Skip to content

Commit

Permalink
gci format
Browse files Browse the repository at this point in the history
Signed-off-by: yuteng <[email protected]>
  • Loading branch information
0yukali0 committed Jul 26, 2024
1 parent 6f4e0ff commit 9397d4f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package batchscheduler

import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
)

var (
Expand All @@ -27,6 +28,6 @@ func (d *DefaultPlugin) ParseJob(
) error {
return nil
}
func (d *DefaultPlugin) ProcessHead(metadata *metav1.ObjectMeta, head *v1.PodSpec) {}
func (d *DefaultPlugin) ProcessHead(metadata *metav1.ObjectMeta, head *v1.PodSpec) {}
func (d *DefaultPlugin) ProcessWorker(metadata *metav1.ObjectMeta, worker *v1.PodSpec, index int) {}
func (d *DefaultPlugin) AfterProcess(metadata *metav1.ObjectMeta) {}
func (d *DefaultPlugin) AfterProcess(metadata *metav1.ObjectMeta) {}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package batchscheduler

import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
)

type SchedulerPlugin interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import (
)

func TestCreateSchedulerPlugin(t *testing.T) {
var tests = []struct{
input *Config
var tests = []struct {
input *Config
expect string
}{
{input: &Config{Scheduler: DefaultScheduler}, expect: DefaultScheduler},
{input: &Config{Scheduler: Yunikorn}, expect: Yunikorn},
{input: &Config{Scheduler:"Unknown"}, expect: DefaultScheduler},
{input: &Config{Scheduler: "Unknown"}, expect: DefaultScheduler},
}
for _, tt := range tests {
t.Run("New scheduler plugin", func(t *testing.T) {
p := NewSchedulerPlugin(tt.input)
assert.Equal(t, tt.expect, p.GetSchedulerName())
})
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/json"
"fmt"

"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
)

const (
Expand All @@ -20,7 +21,7 @@ const (

type YunikornGangSchedulingConfig struct {
Annotations map[string]map[string]string
Parameters string
Parameters string
}

func NewYunikornPlugin() *YunikornGangSchedulingConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package batchscheduler

import (
"testing"
"encoding/json"
"testing"

"github.com/stretchr/testify/assert"

"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/plugins"
)

var (
Expand Down

0 comments on commit 9397d4f

Please sign in to comment.