Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: remove org context switcher in the cli#13674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 14 commits intomainfromstevenmasley/unified_org_cli
Jul 1, 2024
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
remove test that no longer makes sensE
  • Loading branch information
@Emyrk
Emyrk committedJun 26, 2024
commitfcf27d38e1b0fd505cb65bf9db87194a36680ab9
25 changes: 0 additions & 25 deletionscli/login_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,9 @@ import (
"fmt"
"net/http"
"net/http/httptest"
"os"
"runtime"
"testing"

"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand DownExpand Up@@ -424,29 +422,6 @@ func TestLogin(t *testing.T) {
require.NotEqual(t, client.SessionToken(), sessionFile)
})

// Login should reset the configured organization if the user is not a member
t.Run("ResetOrganization", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
coderdtest.CreateFirstUser(t, client)
root, cfg := clitest.New(t, "login", client.URL.String(), "--token", client.SessionToken())

notRealOrg := uuid.NewString()
err := cfg.Organization().Write(notRealOrg)
require.NoError(t, err, "write bad org to config")

err = root.Run()
require.NoError(t, err)
sessionFile, err := cfg.Session().Read()
require.NoError(t, err)
require.NotEqual(t, client.SessionToken(), sessionFile)

// Organization config should be deleted since the org does not exist
selected, err := cfg.Organization().Read()
require.ErrorIs(t, err, os.ErrNotExist)
require.NotEqual(t, selected, notRealOrg)
})

t.Run("KeepOrganizationContext", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp