Skip to content

Commit 09e8047

Browse files
committed
PR
1 parent a011c7c commit 09e8047

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

cli/cage/audit/command_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ func TestAuditCommandRun(t *testing.T) {
9191
)
9292

9393
cmd := audit.NewCommand(mockDI, &cageapp.AuditCmdInput{
94+
Region: "ap-northeast-1",
9495
Cluster: "cluster",
9596
Service: "service",
9697
JSON: true,
@@ -105,6 +106,7 @@ func TestAuditCommandRun(t *testing.T) {
105106
var finalResult audit.FinalResult
106107
err = json.Unmarshal([]byte(jsonOutput), &finalResult)
107108
assert.NoError(err)
109+
assert.Equal("ap-northeast-1", finalResult.Target.Region)
108110
assert.Equal("cluster", finalResult.Target.Cluster)
109111
assert.Equal("service", finalResult.Target.Service)
110112
assert.Equal(0, finalResult.Result.Summary.CriticalCount)

cli/cage/audit/printer.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ type printer struct {
2020

2121
type Printer interface {
2222
Print(result []*ScanResult)
23-
PrintJSON(metadata *Target, scanResults []*ScanResult)
23+
PrintJSON(metadata Target, scanResults []*ScanResult)
2424
}
2525

26+
var _ Printer = (*printer)(nil)
27+
2628
func NewPrinter(di *di.D, noColor, logDetail bool) *printer {
2729
return &printer{
2830
di: di,

cli/cage/audit/scanner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type Scanner interface {
1616
Scan(ctx context.Context, cluster string, service string) ([]*ScanResult, error)
1717
}
1818

19+
var _ Scanner = (*scanner)(nil)
20+
1921
func NewScanner(ecs awsiface.EcsClient, ecr awsiface.EcrClient) Scanner {
2022
return &scanner{ecs: ecs, ecr: ecr}
2123
}

0 commit comments

Comments
 (0)