Feat/separate functions (#19)
* chore: work save * fix: refactor flavors * fix: refactor pg user and database * fix: refactor flavor parameters * fix: refactor tf script * chore: work save * chore: work save * chore: work save --------- Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
parent
910551f09d
commit
0150fea302
54 changed files with 6010 additions and 2826 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package postgresflexalpha
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
|
@ -182,3 +183,50 @@ func TestToCreatePayload(t *testing.T) {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_cleanString(t *testing.T) {
|
||||
type args struct {
|
||||
s *string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *string
|
||||
}{
|
||||
{
|
||||
name: "simple_value",
|
||||
args: args{
|
||||
s: utils.Ptr("mytest"),
|
||||
},
|
||||
want: utils.Ptr("mytest"),
|
||||
},
|
||||
{
|
||||
name: "simple_value_with_quotes",
|
||||
args: args{
|
||||
s: utils.Ptr("\"mytest\""),
|
||||
},
|
||||
want: utils.Ptr("mytest"),
|
||||
},
|
||||
{
|
||||
name: "simple_values_with_quotes",
|
||||
args: args{
|
||||
s: utils.Ptr("\"my test here\""),
|
||||
},
|
||||
want: utils.Ptr("my test here"),
|
||||
},
|
||||
{
|
||||
name: "simple_values",
|
||||
args: args{
|
||||
s: utils.Ptr("my test here"),
|
||||
},
|
||||
want: utils.Ptr("my test here"),
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := cleanString(tt.args.s); !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("cleanString() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue