pbacsko commented on code in PR #438:
URL: https://github.com/apache/yunikorn-k8shim/pull/438#discussion_r911848068


##########
test/e2e/simple_preemptor/simple_preemptor_test.go:
##########
@@ -0,0 +1,182 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package simple_preemptor_test
+
+import (
+       "fmt"
+       "strings"
+
+       "github.com/onsi/ginkgo"
+       "github.com/onsi/gomega"
+       v1 "k8s.io/api/core/v1"
+       k8serrors "k8s.io/apimachinery/pkg/api/errors"
+       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+       "k8s.io/apimachinery/pkg/types"
+
+       "github.com/apache/yunikorn-k8shim/test/e2e/framework/configmanager"
+       "github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/common"
+       "github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/k8s"
+       "github.com/apache/yunikorn-k8shim/test/e2e/framework/helpers/yunikorn"
+)
+
+var _ = ginkgo.Describe("SimplePreemptor", func() {
+       var kClient k8s.KubeCtl
+       var ns *v1.Namespace
+       var oldConfigMap *v1.ConfigMap
+       var dev = "dev" + common.RandSeq(5)
+
+       // Define sleepPod
+       sleepPodConfigs := k8s.SleepPodConfig{Name: "sleepjob", NS: dev, Mem: 
5000, Time: 600, RequiredNode: "yk8s-worker"}
+       sleepPod2Configs := k8s.SleepPodConfig{Name: "sleepjob2", NS: dev, Mem: 
5000, Time: 600}
+       sleepPod3Configs := k8s.SleepPodConfig{Name: "sleepjob3", NS: dev, 
RequiredNode: "yk8s-worker2", Mem: 4000, Time: 600}

Review Comment:
   Ok, so this test needs multiple nodes, but it only works if we have the 
appropriate KIND setup.
   
   Can we make it more universal? 
   
   At least, if it's not running against a 3-node KIND cluster, throw an error 
or something.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to