Skip to content

Commit

Permalink
Retry function does not take params; should be bool (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-mcgoodwin authored Dec 13, 2023
1 parent 652c0fe commit 0e21e20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Function struct {
EntryPoint string `json:"entrypoint"`
Memory string `json:"memory"`
Region string `json:"region"`
Retry string `json:"retry"`
Retry bool `json:"retry"`
Runtime string `json:"runtime"`
Source string `json:"source"`
Timeout string `json:"timeout"`
Expand Down Expand Up @@ -354,8 +354,8 @@ func CreateExecutionPlan(cfg *Config) (Plan, error) {
if f.Region != "" {
args = append(args, "--region", f.Region)
}
if f.Retry != "" {
args = append(args, "--retry", f.Retry)
if f.Retry {
args = append(args, "--retry")
}
if f.Timeout != "" {
args = append(args, "--timeout", f.Timeout)
Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func TestExecutePlan(t *testing.T) {
TriggerResource: "gs://bucket/files/cool",
Source: "src/",
Region: "us-east1",
Retry: "3",
Retry: true,
},
{
Name: "ProcessMoreEvents",
Expand All @@ -293,7 +293,7 @@ func TestExecutePlan(t *testing.T) {
{"--quiet", "functions", "deploy", "--project", pId, "--verbosity", "info", "ProcessEvents", "--runtime", "go111", "--trigger-http", "--allow-unauthenticated", "--memory", "512MB", "--timeout", "20s"},
{"--quiet", "functions", "deploy", "--project", pId, "--verbosity", "info", "ProcessEvents", "--runtime", "go111", "--trigger-http", "--gen2", "--memory", "512MB", "--timeout", "20s"},
{"--quiet", "functions", "deploy", "--project", pId, "--verbosity", "info", "ProcessPubSub", "--runtime", "python37", "--trigger-topic", "topic/emails/filtered", "--memory", "2048MB", "--timeout", "20s"},
{"--quiet", "functions", "deploy", "--project", pId, "--verbosity", "info", "ProcessNews", "--runtime", "go111", "--trigger-bucket", "gs://bucket/files/cool", "--source", "src/", "--region", "us-east1", "--retry", "3"},
{"--quiet", "functions", "deploy", "--project", pId, "--verbosity", "info", "ProcessNews", "--runtime", "go111", "--trigger-bucket", "gs://bucket/files/cool", "--source", "src/", "--region", "us-east1", "--retry"},
{"--quiet", "functions", "deploy", "--project", pId, "--verbosity", "info", "ProcessMoreEvents", "--runtime", "go111", "--trigger-event", "my.event", "--trigger-resource=my.trigger.resource", "--entry-point", "FuncEntryPoint"},
{"--quiet", "functions", "deploy", "--project", pId, "--verbosity", "info", "ProcessEventsWithDifferentSA", "--runtime", "nodejs10", "--trigger-http", "--memory", "512MB", "--timeout", "20s", "--service-account", "account@project.iam.gserviceaccount.com"},
},
Expand Down

0 comments on commit 0e21e20

Please sign in to comment.