github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/singletons/auth_client/client_test.go (about) 1 package authClient_test 2 3 import ( 4 "testing" 5 6 commonTest "github.com/taubyte/tau-cli/common/test" 7 authClient "github.com/taubyte/tau-cli/singletons/auth_client" 8 "github.com/taubyte/tau-cli/singletons/config" 9 "github.com/taubyte/tau-cli/singletons/session" 10 "gotest.tools/v3/assert" 11 ) 12 13 func TestClient(t *testing.T) { 14 profiles := config.Profiles() 15 testProfileName := "prof1" 16 testProfile := config.Profile{ 17 Provider: "github", 18 Token: commonTest.GitToken(), 19 Default: false, 20 NetworkType: "Remote", 21 Network: "sandbox.taubyte.com", 22 } 23 24 assert.NilError(t, profiles.Set(testProfileName, testProfile)) 25 assert.NilError(t, session.Set().ProfileName(testProfileName)) 26 27 _, err := authClient.Load() 28 assert.NilError(t, err) 29 }