gofmt: 清理 admin/executor 测试文件的对齐空格

这两个文件在 HEAD 上就未通过 gofmt, 但 go test 不检查 gofmt,
所以一直没暴露. 修一下让 gofmt -l . 干净, 否则新加的 commit
之前都得先 stash.

纯格式变更, 无逻辑变化.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-07-13 19:55:26 +08:00
co-authored by Claude
parent 44c9f415b7
commit 67d1e9a6c5
2 changed files with 18 additions and 18 deletions
+14 -14
View File
@@ -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 { func fullClusterMap(id string) map[string]any {
return map[string]any{ return map[string]any{
"id": id, "id": id,
"name": id + "-name", "name": id + "-name",
"rm_url": "http://rm.example.com:8088", "rm_url": "http://rm.example.com:8088",
"shs_url": "http://shs.example.com:18080", "shs_url": "http://shs.example.com:18080",
"spark_submit_execute_bin": "/usr/bin/spark-submit", "spark_submit_execute_bin": "/usr/bin/spark-submit",
"is_active": true, "is_active": true,
"auth_type": "basic", "auth_type": "basic",
"auth_username": "admin", "auth_username": "admin",
"auth_password": "real-secret", "auth_password": "real-secret",
"ssl_verify": false, "ssl_verify": false,
"ssl_ca_bundle": "", "ssl_ca_bundle": "",
"url_allowlist": []string{"*.example.com"}, "url_allowlist": []string{"*.example.com"},
"default_submit_args": []string{"--master", "yarn"}, "default_submit_args": []string{"--master", "yarn"},
"rate_limit_per_min": 10, "rate_limit_per_min": 10,
} }
} }
+4 -4
View File
@@ -29,8 +29,8 @@ func TestRun_FakeBinary(t *testing.T) {
defer cancel() defer cancel()
res, err := Run(ctx, SparkSubmitOpts{ res, err := Run(ctx, SparkSubmitOpts{
Binary: "/bin/echo", Binary: "/bin/echo",
Args: []string{"--master", "yarn; rm -rf /tmp/this-should-not-exist"}, Args: []string{"--master", "yarn; rm -rf /tmp/this-should-not-exist"},
Timeout: 3 * time.Second, Timeout: 3 * time.Second,
}) })
if err != nil { if err != nil {
@@ -54,8 +54,8 @@ func TestRun_NonZeroExit(t *testing.T) {
t.Skip("uses unix binary") t.Skip("uses unix binary")
} }
res, err := Run(context.Background(), SparkSubmitOpts{ res, err := Run(context.Background(), SparkSubmitOpts{
Binary: "/bin/sh", Binary: "/bin/sh",
Args: []string{"-c", "exit 7"}, Args: []string{"-c", "exit 7"},
Timeout: 3 * time.Second, Timeout: 3 * time.Second,
}) })
if err == nil { if err == nil {