Skip to content

Commit aa90698

Browse files
committed
Fix e2e tests
1 parent ebf2f77 commit aa90698

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.github/workflows/coder.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ jobs:
157157
GOMAXPROCS: ${{ runner.os == 'Windows' && 1 || 2 }}
158158
run: gotestsum --junitfile="gotests.xml" --packages="./..." --
159159
-covermode=atomic -coverprofile="gotests.coverage"
160+
-coverpkg=./.,github.com/coder/coder/codersdk
160161
-timeout=3m -count=$GOCOUNT -race -short -failfast
161162

162163
- name: Upload DataDog Trace
@@ -172,6 +173,7 @@ jobs:
172173
if: runner.os == 'Linux'
173174
run: DB=true gotestsum --junitfile="gotests.xml" --packages="./..." --
174175
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
176+
-coverpkg=./.,github.com/coder/coder/codersdk
175177
-count=1 -race -parallel=2 -failfast
176178

177179
- name: Upload DataDog Trace

develop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function create_initial_user() {
1818
curl -X POST \
1919
-d "{\"email\": \"$EMAIL\", \"username\": \"$USERNAME\", \"organization\": \"$ORGANIZATION\", \"password\": \"$PASSWORD\"}" \
2020
-H 'Content-Type:application/json' \
21-
http://localhost:3000/api/v2/user
21+
http://localhost:3000/api/v2/users/first
2222
}
2323

2424
# Run yarn install, to make sure node_modules are ready to go

images/coder/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function create_initial_user() {
1717
curl -X POST \
1818
-d '{"email": "'"$EMAIL"'", "username": "'"$USERNAME"'", "organization": "'"$ORGANIZATION"'", "password": "'"$PASSWORD"'"}' \
1919
-H 'Content-Type:application/json' \
20-
"http://localhost:$PORT/api/v2/user"
20+
"http://localhost:$PORT/api/v2/users/first"
2121
}
2222

2323
# This is a way to run multiple processes in parallel, and have Ctrl-C work correctly

site/e2e/globalSetup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const globalSetup = async (config: FullConfig): Promise<void> => {
1111
})
1212

1313
// Create initial user
14-
await context.post("/api/v2/user", {
14+
await context.post("/api/v2/users/first", {
1515
data: {
1616
email,
1717
username,

site/pages/projects/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { CodeExample } from "../../components/CodeExample/CodeExample"
1818
const ProjectsPage: React.FC = () => {
1919
const styles = useStyles()
2020
const { me, signOut } = useUser(true)
21-
const { data: projects, error } = useSWR<Project[] | null, Error>("/api/v2/projects")
2221
const { data: orgs, error: orgsError } = useSWR<Organization[], Error>("/api/v2/users/me/organizations")
22+
const { data: projects, error } = useSWR<Project[] | null, Error>(orgs ? `/api/v2/organizations/${orgs[0].id}/projects` : null)
2323

2424
if (error) {
2525
return <ErrorSummary error={error} />

0 commit comments

Comments
 (0)