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

Commit90a9987

Browse files
committed
fix more tests
1 parent0a43e32 commit90a9987

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

‎enterprise/coderd/workspaceproxy_test.go‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http/httptest"
88
"net/http/httputil"
99
"net/url"
10+
"runtime"
1011
"testing"
1112
"time"
1213

@@ -168,10 +169,16 @@ func TestRegions(t *testing.T) {
168169
require.Equal(t,proxy.Url,regions[1].PathAppURL)
169170
require.Equal(t,proxy.WildcardHostname,regions[1].WildcardHostname)
170171

172+
waitTime:=testutil.WaitShort/10
173+
// windows needs more time
174+
ifruntime.GOOS=="windows" {
175+
waitTime=testutil.WaitShort/5
176+
}
177+
171178
// Unfortunately need to wait to assert createdAt/updatedAt
172-
<-time.After(testutil.WaitShort/10)
173-
require.WithinDuration(t,approxCreateTime,proxy.CreatedAt,testutil.WaitShort/10)
174-
require.WithinDuration(t,approxCreateTime,proxy.UpdatedAt,testutil.WaitShort/10)
179+
<-time.After(waitTime)
180+
require.WithinDuration(t,approxCreateTime,proxy.CreatedAt,waitTime)
181+
require.WithinDuration(t,approxCreateTime,proxy.UpdatedAt,waitTime)
175182
})
176183

177184
t.Run("RequireAuth",func(t*testing.T) {

‎enterprise/coderd/workspacequota_test.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"encoding/json"
77
"fmt"
88
"net/http"
9+
"runtime"
910
"sync"
1011
"testing"
1112
"time"
@@ -565,6 +566,10 @@ func TestWorkspaceSerialization(t *testing.T) {
565566
})
566567

567568
t.Run("ActivityBump",func(t*testing.T) {
569+
ifruntime.GOOS=="windows" {
570+
t.Skip("Even though this test is expected to 'likely always fail', it doesn't fail on Windows")
571+
}
572+
568573
t.Log("Expected to fail. As long as quota & deadline are on the same "+
569574
" table and affect the same row, this will likely always fail.")
570575
// +---------------------+----------------------------------+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp