chore(terraform): refactor region overrides in mapping funcs (#872)
This commit is contained in:
parent
0272a86292
commit
5e5404b459
31 changed files with 185 additions and 194 deletions
|
|
@ -304,3 +304,43 @@ func TestFormatPossibleValues(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsUndefined(t *testing.T) {
|
||||
type args struct {
|
||||
val value
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "undefined value",
|
||||
args: args{
|
||||
val: types.StringNull(),
|
||||
},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "unknown value",
|
||||
args: args{
|
||||
val: types.StringUnknown(),
|
||||
},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "string value",
|
||||
args: args{
|
||||
val: types.StringValue(""),
|
||||
},
|
||||
want: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := IsUndefined(tt.args.val); got != tt.want {
|
||||
t.Errorf("IsUndefined() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue