Skip to content

Commit

Permalink
Merge pull request #85 from cludden/nish/update-test-client
Browse files Browse the repository at this point in the history
Ensure updateID is passed through test client.
  • Loading branch information
cludden authored Jan 6, 2025
2 parents 455e907 + 53e7e1e commit 4f1a42b
Show file tree
Hide file tree
Showing 21 changed files with 88 additions and 49 deletions.
4 changes: 2 additions & 2 deletions gen/example/helloworld/v1/example_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/example/mutex/v1/mutex_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/example/schedule/v1/schedule_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions gen/example/v1/example_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/example/v1/examplev1xns/example_xns_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions gen/example/xns/v1/xns_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions gen/test/option/v1/option_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 26 additions & 6 deletions gen/test/simple/v1/simple_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/test/xnserr/v1/xnserr_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions internal/plugin/testclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,17 @@ func (svc *Manifest) genTestClientImplUpdateAsyncMethod(f *g.File, update protor
})
fn.If(g.Err().Op("!=").Nil()).Block(
g.Return(g.Nil(), g.Qual("fmt", "Errorf").Call(g.Lit("error initializing UpdateWorkflowWithOptions: %w"), g.Err())),
)
).Line()

fn.If(g.Id("options").Dot("UpdateID").Op("==").Lit("")).Block(
g.Id("options").Dot("UpdateID").Op("=").Id("workflowID"),
).Line()

// update workflow
fn.Id("uc").Op(":=").Qual(testutilPkg, "NewUpdateCallbacks").Call()
fn.Id("c").Dot("env").Dot("UpdateWorkflow").CallFunc(func(args *g.Group) {
args.Id(svc.toCamel("%sUpdateName", update))
args.Id("workflowID")
args.Id("options").Dot("UpdateID")
args.Id("uc")
if hasInput {
args.Id("req")
Expand Down

0 comments on commit 4f1a42b

Please sign in to comment.