mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
Hide build logs older than 30 days (#4436)
This commit is contained in:
@ -299,10 +299,9 @@ func TestWorkspaceApplicationAuth(t *testing.T) {
|
||||
require.Equal(t, u.String(), gotLocation.Query().Get("redirect_uri"))
|
||||
|
||||
// Load the application auth-redirect endpoint.
|
||||
qp := codersdk.WithQueryParams(map[string]string{
|
||||
"redirect_uri": u.String(),
|
||||
})
|
||||
resp, err = client.Request(ctx, http.MethodGet, "/api/v2/applications/auth-redirect", nil, qp)
|
||||
resp, err = client.Request(ctx, http.MethodGet, "/api/v2/applications/auth-redirect", nil, codersdk.WithQueryParam(
|
||||
"redirect_uri", u.String(),
|
||||
))
|
||||
require.NoError(t, err)
|
||||
defer resp.Body.Close()
|
||||
|
||||
@ -434,15 +433,13 @@ func TestWorkspaceApplicationAuth(t *testing.T) {
|
||||
c := c
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
qp := map[string]string{}
|
||||
if c.redirectURI != "" {
|
||||
qp["redirect_uri"] = c.redirectURI
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
|
||||
defer cancel()
|
||||
|
||||
resp, err := client.Request(ctx, http.MethodGet, "/api/v2/applications/auth-redirect", nil, codersdk.WithQueryParams(qp))
|
||||
resp, err := client.Request(ctx, http.MethodGet, "/api/v2/applications/auth-redirect", nil,
|
||||
codersdk.WithQueryParam("redirect_uri", c.redirectURI),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
defer resp.Body.Close()
|
||||
require.Equal(t, http.StatusBadRequest, resp.StatusCode)
|
||||
|
Reference in New Issue
Block a user