From 3acd0f1a900a933e8612c1b4af55d29b1112cbf1 Mon Sep 17 00:00:00 2001 From: Yi Chen Date: Mon, 14 Oct 2024 09:23:16 +0800 Subject: [PATCH] remove redundant test.sh file (#2243) * Fix go lint error Signed-off-by: Yi Chen * Remove test.sh Signed-off-by: Yi Chen --------- Signed-off-by: Yi Chen --- .../sparkapplication/controller_test.go | 6 ++---- test.sh | 15 --------------- 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100755 test.sh diff --git a/internal/controller/sparkapplication/controller_test.go b/internal/controller/sparkapplication/controller_test.go index 7e0264c54..30d1fd007 100644 --- a/internal/controller/sparkapplication/controller_test.go +++ b/internal/controller/sparkapplication/controller_test.go @@ -369,8 +369,7 @@ var _ = Describe("SparkApplication Controller", func() { Expect(result.Requeue).To(BeFalse()) app := &v1beta2.SparkApplication{} - err = k8sClient.Get(ctx, key, app) - Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient.Get(ctx, key, app)).NotTo(HaveOccurred()) Expect(app.Status.ExecutorState).To(HaveLen(2)) }) @@ -389,8 +388,7 @@ var _ = Describe("SparkApplication Controller", func() { Expect(result.Requeue).To(BeFalse()) app := &v1beta2.SparkApplication{} - err = k8sClient.Get(ctx, key, app) - Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient.Get(ctx, key, app)).NotTo(HaveOccurred()) Expect(app.Status.ExecutorState).To(HaveLen(1)) }) }) diff --git a/test.sh b/test.sh deleted file mode 100755 index 87ffb6e00..000000000 --- a/test.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -DOCKERFILE_RESOURCES=$(cat Dockerfile | grep -o "COPY [a-zA-Z0-9].*? " | cut -c6-) - -for resource in $DOCKERFILE_RESOURCES; do - # If the resource is different - if ! git diff --quiet origin/master -- $resource; then - ## And the appVersion hasn't been updated - if ! git diff origin/master -- charts/spark-operator-chart/Chart.yaml | grep +appVersion; then - echo "resource used in docker.io/kubeflow/spark-operator has changed in $resource, need to update the appVersion in charts/spark-operator-chart/Chart.yaml" - git diff origin/master -- $resource; - echo "failing the build... " && false - fi - fi -done