@@ -3,7 +3,6 @@ package cli_test
3
3
import (
4
4
"bufio"
5
5
"context"
6
- "errors"
7
6
"fmt"
8
7
"net/http"
9
8
"net/http/httptest"
@@ -76,7 +75,8 @@ func TestWorkspaceProxy_Server_PrometheusEnabled(t *testing.T) {
76
75
_ ,_ = w .Write ([]byte (`{"app_security_key": "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789123456012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789123456"}` ))
77
76
return
78
77
}
79
- if r .URL .Path == "/api/v2/workspaceproxies/me/coordinate" {
78
+ if r .URL .Path == "/api/v2/workspaceproxies/me/coordinate" ||
79
+ r .URL .Path == "/api/v2/buildinfo" {
80
80
// Slow down proxy registration, so that test runner can check if Prometheus endpoint is exposed.
81
81
wg .Wait ()
82
82
@@ -107,8 +107,7 @@ func TestWorkspaceProxy_Server_PrometheusEnabled(t *testing.T) {
107
107
108
108
// Start "wsproxy server" command
109
109
clitest .StartWithAssert (t ,inv ,func (t * testing.T ,err error ) {
110
- assert .Error (t ,err )
111
- assert .False (t ,errors .Is (err ,context .Canceled ),"error was expected, but context was canceled" )
110
+ // actually no assertions are needed as the test verifies only Prometheus endpoint
112
111
})
113
112
pty .ExpectMatchContext (ctx ,"Started HTTP listener at" )
114
113