Compare commits

..

No commits in common. "835fb05b873acd806cabe097770b7eb3bc18ff32" and "386c7d3041cc1cfd60d91b6091d427898ffa1fcd" have entirely different histories.

6 changed files with 16 additions and 30 deletions

View File

@ -411,5 +411,5 @@ func new{{.PascalName}}() *cobra.Command {
{{- define "request-body-obj" -}} {{- define "request-body-obj" -}}
{{- $method := .Method -}} {{- $method := .Method -}}
{{- $field := .Field -}} {{- $field := .Field -}}
{{$method.CamelName}}Req{{ if (and $method.RequestBodyField (and (not $field.IsPath) (not $field.IsQuery))) }}.{{$method.RequestBodyField.PascalName}}{{end}}.{{$field.PascalName}} {{$method.CamelName}}Req{{ if (and $method.RequestBodyField (not $field.IsPath)) }}.{{$method.RequestBodyField.PascalName}}{{end}}.{{$field.PascalName}}
{{- end -}} {{- end -}}

View File

@ -29,17 +29,12 @@ snapshot:
vendor: vendor:
@echo "✓ Filling vendor folder with library code ..." @echo "✓ Filling vendor folder with library code ..."
@go mod vendor @go mod vendor
integration:
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h
schema: schema:
@echo "✓ Generating json-schema ..." @echo "✓ Generating json-schema ..."
@go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json @go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
INTEGRATION = gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h .PHONY: lint lintcheck test testonly coverage build snapshot vendor integration schema
integration:
$(INTEGRATION)
integration-short:
$(INTEGRATION) -short
.PHONY: lint lintcheck test testonly coverage build snapshot vendor schema integration integration-short

View File

@ -12,12 +12,12 @@ import (
) )
func TestDeployBundleWithCluster(t *testing.T) { func TestDeployBundleWithCluster(t *testing.T) {
if testutil.GetCloud(t) == testutil.AWS { ctx, wt := acc.WorkspaceTest(t)
if testutil.IsAWSCloud(wt) {
t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters") t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters")
} }
ctx, wt := acc.WorkspaceTest(t)
nodeTypeId := testutil.GetCloud(t).NodeTypeID() nodeTypeId := testutil.GetCloud(t).NodeTypeID()
uniqueId := uuid.New().String() uniqueId := uuid.New().String()
root := initTestTemplate(t, ctx, "clusters", map[string]any{ root := initTestTemplate(t, ctx, "clusters", map[string]any{
@ -44,11 +44,6 @@ func TestDeployBundleWithCluster(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.NotNil(t, cluster) require.NotNil(t, cluster)
if testing.Short() {
t.Log("Skip the job run in short mode")
return
}
out, err := runResource(t, ctx, root, "foo") out, err := runResource(t, ctx, root, "foo")
require.NoError(t, err) require.NoError(t, err)
require.Contains(t, out, "Hello World!") require.Contains(t, out, "Hello World!")

View File

@ -29,11 +29,6 @@ func runPythonWheelTest(t *testing.T, templateName, sparkVersion string, pythonW
destroyBundle(t, ctx, bundleRoot) destroyBundle(t, ctx, bundleRoot)
}) })
if testing.Short() {
t.Log("Skip the job run in short mode")
return
}
out, err := runResource(t, ctx, bundleRoot, "some_other_job") out, err := runResource(t, ctx, bundleRoot, "some_other_job")
require.NoError(t, err) require.NoError(t, err)
require.Contains(t, out, "Hello from my func") require.Contains(t, out, "Hello from my func")
@ -56,7 +51,9 @@ func TestPythonWheelTaskDeployAndRunWithWrapper(t *testing.T) {
} }
func TestPythonWheelTaskDeployAndRunOnInteractiveCluster(t *testing.T) { func TestPythonWheelTaskDeployAndRunOnInteractiveCluster(t *testing.T) {
if testutil.GetCloud(t) == testutil.AWS { _, wt := acc.WorkspaceTest(t)
if testutil.IsAWSCloud(wt) {
t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters") t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters")
} }

View File

@ -30,11 +30,6 @@ func runSparkJarTestCommon(t *testing.T, ctx context.Context, sparkVersion, arti
destroyBundle(t, ctx, bundleRoot) destroyBundle(t, ctx, bundleRoot)
}) })
if testing.Short() {
t.Log("Skip the job run in short mode")
return
}
out, err := runResource(t, ctx, bundleRoot, "jar_job") out, err := runResource(t, ctx, bundleRoot, "jar_job")
require.NoError(t, err) require.NoError(t, err)
require.Contains(t, out, "Hello from Jar!") require.Contains(t, out, "Hello from Jar!")

View File

@ -58,3 +58,7 @@ func GetCloud(t TestingT) Cloud {
} }
return -1 return -1
} }
func IsAWSCloud(t TestingT) bool {
return GetCloud(t) == AWS
}