From 67d1e9a6c5aeb7205cc0d39a7fa67b5fac61284d Mon Sep 17 00:00:00 2001 From: "tao.chen" <93983997+taochen-ct@users.noreply.github.com> Date: Mon, 13 Jul 2026 19:55:26 +0800 Subject: [PATCH] =?UTF-8?q?gofmt:=20=E6=B8=85=E7=90=86=20admin/executor=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=96=87=E4=BB=B6=E7=9A=84=E5=AF=B9=E9=BD=90?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这两个文件在 HEAD 上就未通过 gofmt, 但 go test 不检查 gofmt, 所以一直没暴露. 修一下让 gofmt -l . 干净, 否则新加的 commit 之前都得先 stash. 纯格式变更, 无逻辑变化. Co-Authored-By: Claude --- internal/admin/router_test.go | 28 +++++++++++++------------- internal/executor/spark_submit_test.go | 8 ++++---- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/admin/router_test.go b/internal/admin/router_test.go index e01b6d0..db397f6 100644 --- a/internal/admin/router_test.go +++ b/internal/admin/router_test.go @@ -54,20 +54,20 @@ func doReq(t *testing.T, r *gin.Engine, method, path, token string, body any) *h func fullClusterMap(id string) map[string]any { return map[string]any{ - "id": id, - "name": id + "-name", - "rm_url": "http://rm.example.com:8088", - "shs_url": "http://shs.example.com:18080", - "spark_submit_execute_bin": "/usr/bin/spark-submit", - "is_active": true, - "auth_type": "basic", - "auth_username": "admin", - "auth_password": "real-secret", - "ssl_verify": false, - "ssl_ca_bundle": "", - "url_allowlist": []string{"*.example.com"}, - "default_submit_args": []string{"--master", "yarn"}, - "rate_limit_per_min": 10, + "id": id, + "name": id + "-name", + "rm_url": "http://rm.example.com:8088", + "shs_url": "http://shs.example.com:18080", + "spark_submit_execute_bin": "/usr/bin/spark-submit", + "is_active": true, + "auth_type": "basic", + "auth_username": "admin", + "auth_password": "real-secret", + "ssl_verify": false, + "ssl_ca_bundle": "", + "url_allowlist": []string{"*.example.com"}, + "default_submit_args": []string{"--master", "yarn"}, + "rate_limit_per_min": 10, } } diff --git a/internal/executor/spark_submit_test.go b/internal/executor/spark_submit_test.go index 79a718d..eff7939 100644 --- a/internal/executor/spark_submit_test.go +++ b/internal/executor/spark_submit_test.go @@ -29,8 +29,8 @@ func TestRun_FakeBinary(t *testing.T) { defer cancel() res, err := Run(ctx, SparkSubmitOpts{ - Binary: "/bin/echo", - Args: []string{"--master", "yarn; rm -rf /tmp/this-should-not-exist"}, + Binary: "/bin/echo", + Args: []string{"--master", "yarn; rm -rf /tmp/this-should-not-exist"}, Timeout: 3 * time.Second, }) if err != nil { @@ -54,8 +54,8 @@ func TestRun_NonZeroExit(t *testing.T) { t.Skip("uses unix binary") } res, err := Run(context.Background(), SparkSubmitOpts{ - Binary: "/bin/sh", - Args: []string{"-c", "exit 7"}, + Binary: "/bin/sh", + Args: []string{"-c", "exit 7"}, Timeout: 3 * time.Second, }) if err == nil {