Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation on process node to check reference to non-task node #1567

Merged
merged 2 commits into from
Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"github.com/stretchr/testify/require"
)

func testOrchestratorRefTask(executionStream pb.Execution_StreamClient, instanceHash hash.Hash) func(t *testing.T) {
func testOrchestratorRefGrandParentTask(executionStream pb.Execution_StreamClient, instanceHash hash.Hash) func(t *testing.T) {
return func(t *testing.T) {
var processHash hash.Hash
t.Run("create process", func(t *testing.T) {
respProc, err := client.ProcessClient.Create(context.Background(), &pb.CreateProcessRequest{
Name: "ref-task",
Name: "ref-grand-parent-task",
Nodes: []*process.Process_Node{
{
Key: "n0",
Expand Down
117 changes: 0 additions & 117 deletions e2e/orchestrator_ref_node_test.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (
"github.com/stretchr/testify/require"
)

func testOrchestratorRefNested(executionStream pb.Execution_StreamClient, instanceHash hash.Hash) func(t *testing.T) {
func testOrchestratorRefPathNested(executionStream pb.Execution_StreamClient, instanceHash hash.Hash) func(t *testing.T) {
return func(t *testing.T) {
var processHash hash.Hash

t.Run("create process", func(t *testing.T) {
respProc, err := client.ProcessClient.Create(context.Background(), &pb.CreateProcessRequest{
Name: "nested-data",
Name: "nested-path-data",
Nodes: []*process.Process_Node{
{
Key: "n0",
Expand Down
189 changes: 0 additions & 189 deletions e2e/orchestrator_ref_result_test.go

This file was deleted.

6 changes: 2 additions & 4 deletions e2e/orchestrator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ func testOrchestrator(t *testing.T) {
t.Run("event task", testOrchestratorEventTask(executionStream, testInstanceHash))
t.Run("result task", testOrchestratorResultTask(executionStream, testRunnerHash, testInstanceHash))
t.Run("map const", testOrchestratorMapConst(executionStream, testInstanceHash))
t.Run("ref result", testOrchestratorRefResult(executionStream, testRunnerHash, testInstanceHash))
t.Run("ref task", testOrchestratorRefTask(executionStream, testInstanceHash))
t.Run("ref grand parent task", testOrchestratorRefGrandParentTask(executionStream, testInstanceHash))
t.Run("nested data", testOrchestratorNestedData(executionStream, testInstanceHash))
t.Run("ref node", testOrchestratorRefNode(executionStream, testInstanceHash))
t.Run("nested map", testOrchestratorNestedMap(executionStream, testInstanceHash))
t.Run("ref nested", testOrchestratorRefNested(executionStream, testInstanceHash))
t.Run("ref path nested", testOrchestratorRefPathNested(executionStream, testInstanceHash))

// to execute last because of go routine leak. See fixme in following function
t.Run("filter", testOrchestratorFilter(executionStream, testInstanceHash))
Expand Down
Loading