Skip to content

Commit

Permalink
Merge pull request #768 from kayac/fix/nullpointer
Browse files Browse the repository at this point in the history
fix null pointer exception
  • Loading branch information
fujiwara authored Nov 6, 2024
2 parents 729ee2c + 3dcc0ac commit 93928fc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion run.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (d *App) Run(ctx context.Context, opt RunOption) error {
return err
}
if tdForRun.Arn == "" && tdForRun.TaskDefinitionInput != nil {
d.Log("Task definition family %s will be registered", *tdForRun.TaskDefinitionInput.Family)
d.Log("Task definition family %s will be registered", aws.ToString(tdForRun.TaskDefinitionInput.Family))
} else {
d.Log("Task definition ARN: %s", tdForRun.Arn)
var err error
Expand Down
3 changes: 2 additions & 1 deletion run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"testing"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/smithy-go/middleware"
"github.com/kayac/ecspresso/v2"
Expand Down Expand Up @@ -131,7 +132,7 @@ func TestTaskDefinitionArnForRun(t *testing.T) {
t.Errorf("%s %s expected %s, got %s", config, args, s.arn, name)
}
} else {
family := *td.TaskDefinitionInput.Family
family := aws.ToString(td.TaskDefinitionInput.Family)
if family != s.family {
t.Errorf("%s %s expected %s, got %s", config, args, s.family, family)
}
Expand Down
1 change: 0 additions & 1 deletion tests/td-in-tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"volumesFrom": []
}
],
"revision": 1,
"cpu": "1024",
"memory": "2048",
"proxyConfiguration": {
Expand Down
1 change: 0 additions & 1 deletion tests/td-plain-in-tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"volumesFrom": []
}
],
"revision": 1,
"cpu": "1024",
"memory": "2048",
"proxyConfiguration": {
Expand Down
1 change: 0 additions & 1 deletion tests/td-plain.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"volumesFrom": []
}
],
"revision": 1,
"cpu": "1024",
"memory": "2048",
"proxyConfiguration": {
Expand Down

0 comments on commit 93928fc

Please sign in to comment.