Skip to content

Commit 9f99fde

Browse files
committed
Fix handlers and format
1 parent 0e052ae commit 9f99fde

File tree

9 files changed

+25
-20
lines changed

9 files changed

+25
-20
lines changed

dogfood/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ locals {
7171
resource "docker_image" "dogfood" {
7272
name = data.docker_registry_image.dogfood.name
7373
pull_triggers = [data.docker_registry_image.dogfood.sha256_digest]
74-
keep_locally = true
74+
keep_locally = true
7575
}
7676

7777
resource "docker_container" "workspace" {

examples/templates/aws-linux/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ data "aws_ami" "ubuntu" {
7373
}
7474

7575
resource "coder_agent" "main" {
76-
arch = "amd64"
77-
auth = "aws-instance-identity"
78-
os = "linux"
76+
arch = "amd64"
77+
auth = "aws-instance-identity"
78+
os = "linux"
7979
startup_script = <<EOT
8080
#!/bin/bash
8181

examples/templates/docker-image-builds/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ data "coder_workspace" "me" {
2222
}
2323

2424
resource "coder_agent" "main" {
25-
arch = data.coder_provisioner.me.arch
26-
os = "linux"
25+
arch = data.coder_provisioner.me.arch
26+
os = "linux"
2727
startup_script = <<EOT
2828
#!/bin/bash
2929

examples/templates/docker/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ resource "docker_container" "workspace" {
7575
dns = ["1.1.1.1"]
7676
# Use the docker gateway if the access URL is 127.0.0.1
7777
command = [
78-
"sh", "-c", replace(coder_agent.main.init_script, "localhost", "host.docker.internal")]
78+
"sh", "-c", replace(coder_agent.main.init_script, "localhost", "host.docker.internal")]
7979
env = ["CODER_AGENT_TOKEN=${coder_agent.main.token}"]
8080
host {
8181
host = "host.docker.internal"

examples/templates/gcp-linux/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ resource "google_compute_disk" "root" {
4646
}
4747

4848
resource "coder_agent" "main" {
49-
auth = "google-instance-identity"
50-
arch = "amd64"
51-
os = "linux"
49+
auth = "google-instance-identity"
50+
arch = "amd64"
51+
os = "linux"
5252
startup_script = <<EOT
5353
#!/bin/bash
5454

examples/templates/gcp-vm-container/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ data "coder_workspace" "me" {
3636
}
3737

3838
resource "coder_agent" "main" {
39-
auth = "google-instance-identity"
40-
arch = "amd64"
41-
os = "linux"
39+
auth = "google-instance-identity"
40+
arch = "amd64"
41+
os = "linux"
4242
startup_script = <<EOT
4343
#!/bin/bash
4444

provisioner/terraform/testdata/resource-metadata/resource-metadata.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ resource "null_resource" "about" {}
1717
resource "coder_metadata" "about_info" {
1818
resource_id = null_resource.about.id
1919
item {
20-
key = "hello"
20+
key = "hello"
2121
value = "world"
2222
}
2323
item {
2424
key = "null"
2525
}
2626
item {
27-
key = "empty"
27+
key = "empty"
2828
value = ""
2929
}
3030
item {
31-
key = "secret"
32-
value = "squirrel"
31+
key = "secret"
32+
value = "squirrel"
3333
sensitive = true
3434
}
3535
}

site/src/components/AuditLogRow/AuditLogRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { UserAvatar } from "components/UserAvatar/UserAvatar"
1010
import { t } from "i18next"
1111
import { ComponentProps, useState } from "react"
1212
import { MONOSPACE_FONT_FAMILY } from "theme/constants"
13+
import userAgentParser from "ua-parser-js"
1314
import { createDayString } from "util/createDayString"
1415
import { AuditLogDiff } from "./AuditLogDiff"
15-
import userAgentParser from "ua-parser-js"
1616

1717
const pillTypeByHttpStatus = (httpStatus: number): ComponentProps<typeof Pill>["type"] => {
1818
if (httpStatus >= 300 && httpStatus < 500) {

site/src/testHelpers/handlers.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,15 @@ export const handlers = [
157157

158158
// Audit
159159
rest.get("/api/v2/audit", (req, res, ctx) => {
160-
return res(ctx.status(200), ctx.json([M.MockAuditLog, M.MockAuditLog2]))
160+
return res(
161+
ctx.status(200),
162+
ctx.json({
163+
audit_logs: [M.MockAuditLog, M.MockAuditLog2],
164+
}),
165+
)
161166
}),
162167

163168
rest.get("/api/v2/audit/count", (req, res, ctx) => {
164-
return res(ctx.status(200), ctx.json(1000))
169+
return res(ctx.status(200), ctx.json({ count: 1000 }))
165170
}),
166171
]

0 commit comments

Comments
 (0)