66
77 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
88 "github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
9- "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
109
1110 "github.com/google/go-cmp/cmp"
1211 "github.com/google/go-cmp/cmp/cmpopts"
@@ -41,8 +40,8 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
4140 ProjectId : testProjectId ,
4241 Verbosity : globalflags .VerbosityDefault ,
4342 },
44- ParentId : utils . Ptr (testParentId ),
45- Name : utils . Ptr (nameFlag ),
43+ ParentId : new (testParentId ),
44+ Name : new (nameFlag ),
4645 }
4746 for _ , mod := range mods {
4847 mod (model )
@@ -53,8 +52,8 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
5352func fixtureRequest (mods ... func (request * resourcemanager.ApiPartialUpdateProjectRequest )) resourcemanager.ApiPartialUpdateProjectRequest {
5453 request := testClient .DefaultAPI .PartialUpdateProject (testCtx , testProjectId )
5554 request = request .PartialUpdateProjectPayload (resourcemanager.PartialUpdateProjectPayload {
56- ContainerParentId : utils . Ptr (testParentId ),
57- Name : utils . Ptr (nameFlag ),
55+ ContainerParentId : new (testParentId ),
56+ Name : new (nameFlag ),
5857 })
5958 for _ , mod := range mods {
6059 mod (& request )
@@ -101,9 +100,9 @@ func TestParseInput(t *testing.T) {
101100 labelValues : []string {"key=value" , "foo=bar" },
102101 expectedModel : fixtureInputModel (
103102 func (model * inputModel ) {
104- model .Labels = & map [string ]string {
105- "key" : "value" ,
106- "foo" : "bar" ,
103+ model .Labels = & map [string ]* string {
104+ "key" : new ( "value ") ,
105+ "foo" : new ( "bar ") ,
107106 }
108107 }),
109108 isValid : true ,
@@ -114,9 +113,9 @@ func TestParseInput(t *testing.T) {
114113 labelValues : []string {"key=value,foo=bar" },
115114 expectedModel : fixtureInputModel (
116115 func (model * inputModel ) {
117- model .Labels = & map [string ]string {
118- "key" : "value" ,
119- "foo" : "bar" ,
116+ model .Labels = & map [string ]* string {
117+ "key" : new ( "value ") ,
118+ "foo" : new ( "bar ") ,
120119 }
121120 }),
122121 isValid : true ,
0 commit comments