mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-05-08 02:49:17 -05:00
5937b9fd98
* feat: add initial docs site * feat: allow workflows to be defined from go sdk * fix release action * chore: remove server dependencies from client * fix: use correct certificate for server * chore: add port and bind address to grpc config * fix: add env for grpc config * fix: nil pointer when output is null * chore: support variation in output args * fix unresolve merge conflict * fix: quickstart improvements * temp remove database url * fix: action id not required for event * fix: actionid validation for events * Remove deleted files
49 lines
1.1 KiB
Go
49 lines
1.1 KiB
Go
package worker
|
|
|
|
// import (
|
|
// "context"
|
|
// "testing"
|
|
// )
|
|
|
|
// // type actionInput struct {
|
|
// // Message string `json:"message"`
|
|
// // }
|
|
|
|
// // type stepOneOutput struct {
|
|
// // Message string `json:"message"`
|
|
// // }
|
|
|
|
// // type stepTwoOutput struct {
|
|
// // Message string `json:"message"`
|
|
// // }
|
|
|
|
// // func TestToWorkflowJob(t *testing.T) {
|
|
// // testJob := WorkflowJob{
|
|
// // Name: "test",
|
|
// // Description: "test",
|
|
// // Timeout: "1m",
|
|
// // Steps: []WorkflowStep{
|
|
// // {
|
|
// // ActionId: "test:test",
|
|
// // Function: func(ctx context.Context, input *actionInput) (result *stepOneOutput, err error) {
|
|
// // return nil, nil
|
|
// // },
|
|
// // },
|
|
// // {
|
|
// // ActionId: "test:test",
|
|
// // Function: func(ctx context.Context, input *stepOneOutput) (result *stepTwoOutput, err error) {
|
|
// // return nil, nil
|
|
// // },
|
|
// // },
|
|
// // },
|
|
// // }
|
|
|
|
// // job, err := testJob.ToWorkflowJob()
|
|
|
|
// // if err != nil {
|
|
// // t.Fatalf("could not convert workflow job: %v", err)
|
|
// // }
|
|
|
|
// // t.Fatalf("%v", job)
|
|
// // }
|