File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ type zoneIDFilterTest struct {
2828 expected bool
2929}
3030
31+ type zoneIdFilterTestIsConfigured struct {
32+ zoneIDFilter []string
33+ expected bool
34+ }
35+
3136func TestZoneIDFilterMatch (t * testing.T ) {
3237 zone := "/hostedzone/ZTST1"
3338
@@ -37,6 +42,11 @@ func TestZoneIDFilterMatch(t *testing.T) {
3742 zone ,
3843 true ,
3944 },
45+ {
46+ []string {"" },
47+ zone ,
48+ true ,
49+ },
4050 {
4151 []string {"/hostedzone/ZTST1" },
4252 zone ,
@@ -77,3 +87,31 @@ func TestZoneIDFilterMatch(t *testing.T) {
7787 assert .Equal (t , tt .expected , zoneIDFilter .Match (tt .zone ))
7888 }
7989}
90+
91+ func TestZoneIDFilterIsConfigured (t * testing.T ) {
92+ for _ , tt := range []zoneIdFilterTestIsConfigured {
93+ {
94+ []string {"" },
95+ false ,
96+ },
97+ {
98+ []string {},
99+ false ,
100+ },
101+ {
102+ []string {"/hostedzone/ZTST2" },
103+ true ,
104+ },
105+ {
106+ []string {"/hostedzone/ZTST2" , "hostedzone/ZTST2" },
107+ true ,
108+ },
109+ {
110+ []string {"/ZSTS2" },
111+ true ,
112+ },
113+ } {
114+ zoneIDFilter := NewZoneIDFilter (tt .zoneIDFilter )
115+ assert .Equal (t , tt .expected , zoneIDFilter .IsConfigured ())
116+ }
117+ }
You can’t perform that action at this time.
0 commit comments