44 "testing"
55
66 "github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
7+ "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
78
89 "github.com/spf13/viper"
910 "github.com/zalando/go-keyring"
@@ -14,10 +15,6 @@ import (
1415
1516var testTokenCustomEndpoint = "token_url"
1617
17- func boolPtr (v bool ) * bool {
18- return & v
19- }
20-
2118func fixtureFlagValues (mods ... func (flagValues map [string ]string )) map [string ]string {
2219 flagValues := map [string ]string {
2320 serviceAccountTokenFlag : "token" ,
@@ -37,7 +34,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
3734 ServiceAccountToken : "token" ,
3835 ServiceAccountKeyPath : "sa_key" ,
3936 PrivateKeyPath : "private_key" ,
40- UseOIDC : boolPtr (true ),
37+ UseOIDC : utils . Ptr (true ),
4138 OnlyPrintAccessToken : true ,
4239 }
4340 for _ , mod := range mods {
@@ -97,7 +94,7 @@ func TestParseInput(t *testing.T) {
9794 }),
9895 isValid : true ,
9996 expectedModel : fixtureInputModel (func (model * inputModel ) {
100- model .UseOIDC = boolPtr (true )
97+ model .UseOIDC = utils . Ptr (true )
10198 }),
10299 },
103100 {
@@ -107,7 +104,7 @@ func TestParseInput(t *testing.T) {
107104 }),
108105 isValid : true ,
109106 expectedModel : fixtureInputModel (func (model * inputModel ) {
110- model .UseOIDC = boolPtr (false )
107+ model .UseOIDC = utils . Ptr (false )
111108 }),
112109 },
113110 {
0 commit comments