Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Aug 24, 2021
1 parent 83ae070 commit 1f47520
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions config/report_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package config

import (
"testing"
)

func TestReportConfigReady(t *testing.T) {
tests := []struct {
c *Config
want bool
}{
{
New(),
false,
},
{
&Config{
Report: &ConfigReport{
Datastores: []string{
"s3://octocov-test/reports",
},
},
},
true,
},
}
for _, tt := range tests {
got := tt.c.ReportConfigReady()
if got != tt.want {
t.Errorf("got %v\nwant %v", got, tt.want)
}
}
}

0 comments on commit 1f47520

Please sign in to comment.