Skip to content

Commit 835fb05

Browse files
authored
Merge branch 'main' into feat/custom-annotations-json-schema
2 parents 386c7d3 + 5b84856 commit 835fb05

File tree

6 files changed

+30
-16
lines changed

6 files changed

+30
-16
lines changed

.codegen/service.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,5 +411,5 @@ func new{{.PascalName}}() *cobra.Command {
411411
{{- define "request-body-obj" -}}
412412
{{- $method := .Method -}}
413413
{{- $field := .Field -}}
414-
{{$method.CamelName}}Req{{ if (and $method.RequestBodyField (not $field.IsPath)) }}.{{$method.RequestBodyField.PascalName}}{{end}}.{{$field.PascalName}}
414+
{{$method.CamelName}}Req{{ if (and $method.RequestBodyField (and (not $field.IsPath) (not $field.IsQuery))) }}.{{$method.RequestBodyField.PascalName}}{{end}}.{{$field.PascalName}}
415415
{{- end -}}

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ snapshot:
2929
vendor:
3030
@echo "✓ Filling vendor folder with library code ..."
3131
@go mod vendor
32-
33-
integration:
34-
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h
35-
32+
3633
schema:
3734
@echo "✓ Generating json-schema ..."
3835
@go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
3936

40-
.PHONY: lint lintcheck test testonly coverage build snapshot vendor integration schema
37+
INTEGRATION = gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h
38+
39+
integration:
40+
$(INTEGRATION)
41+
42+
integration-short:
43+
$(INTEGRATION) -short
44+
45+
.PHONY: lint lintcheck test testonly coverage build snapshot vendor schema integration integration-short

integration/bundle/clusters_test.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import (
1212
)
1313

1414
func TestDeployBundleWithCluster(t *testing.T) {
15-
ctx, wt := acc.WorkspaceTest(t)
16-
17-
if testutil.IsAWSCloud(wt) {
15+
if testutil.GetCloud(t) == testutil.AWS {
1816
t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters")
1917
}
2018

19+
ctx, wt := acc.WorkspaceTest(t)
20+
2121
nodeTypeId := testutil.GetCloud(t).NodeTypeID()
2222
uniqueId := uuid.New().String()
2323
root := initTestTemplate(t, ctx, "clusters", map[string]any{
@@ -44,6 +44,11 @@ func TestDeployBundleWithCluster(t *testing.T) {
4444
require.NoError(t, err)
4545
require.NotNil(t, cluster)
4646

47+
if testing.Short() {
48+
t.Log("Skip the job run in short mode")
49+
return
50+
}
51+
4752
out, err := runResource(t, ctx, root, "foo")
4853
require.NoError(t, err)
4954
require.Contains(t, out, "Hello World!")

integration/bundle/python_wheel_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ func runPythonWheelTest(t *testing.T, templateName, sparkVersion string, pythonW
2929
destroyBundle(t, ctx, bundleRoot)
3030
})
3131

32+
if testing.Short() {
33+
t.Log("Skip the job run in short mode")
34+
return
35+
}
36+
3237
out, err := runResource(t, ctx, bundleRoot, "some_other_job")
3338
require.NoError(t, err)
3439
require.Contains(t, out, "Hello from my func")
@@ -51,9 +56,7 @@ func TestPythonWheelTaskDeployAndRunWithWrapper(t *testing.T) {
5156
}
5257

5358
func TestPythonWheelTaskDeployAndRunOnInteractiveCluster(t *testing.T) {
54-
_, wt := acc.WorkspaceTest(t)
55-
56-
if testutil.IsAWSCloud(wt) {
59+
if testutil.GetCloud(t) == testutil.AWS {
5760
t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters")
5861
}
5962

integration/bundle/spark_jar_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ func runSparkJarTestCommon(t *testing.T, ctx context.Context, sparkVersion, arti
3030
destroyBundle(t, ctx, bundleRoot)
3131
})
3232

33+
if testing.Short() {
34+
t.Log("Skip the job run in short mode")
35+
return
36+
}
37+
3338
out, err := runResource(t, ctx, bundleRoot, "jar_job")
3439
require.NoError(t, err)
3540
require.Contains(t, out, "Hello from Jar!")

internal/testutil/cloud.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,3 @@ func GetCloud(t TestingT) Cloud {
5858
}
5959
return -1
6060
}
61-
62-
func IsAWSCloud(t TestingT) bool {
63-
return GetCloud(t) == AWS
64-
}

0 commit comments

Comments
 (0)