Skip to content

Commit b07add7

Browse files
committed
fix tests
1 parent fa180b4 commit b07add7

7 files changed

Lines changed: 24 additions & 16 deletions

File tree

cli/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ require (
6262
github.com/lestrrat-go/jwx/v3 v3.1.0 // indirect
6363
github.com/lestrrat-go/option/v2 v2.0.0 // indirect
6464
github.com/mattn/go-colorable v0.1.14 // indirect
65-
github.com/mattn/go-isatty v0.0.20 // indirect
65+
github.com/mattn/go-isatty v0.0.21 // indirect
6666
github.com/mattn/go-runewidth v0.0.19 // indirect
6767
github.com/mitchellh/copystructure v1.2.0 // indirect
6868
github.com/mitchellh/reflectwalk v1.0.2 // indirect

cli/go.sum

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ github.com/lestrrat-go/option/v2 v2.0.0 h1:XxrcaJESE1fokHy3FpaQ/cXW8ZsIdWcdFzzLO
122122
github.com/lestrrat-go/option/v2 v2.0.0/go.mod h1:oSySsmzMoR0iRzCDCaUfsCzxQHUEuhOViQObyy7S6Vg=
123123
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
124124
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
125-
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
126-
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
125+
github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=
127126
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
128127
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
129128
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
@@ -239,7 +238,6 @@ golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7
239238
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
240239
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
241240
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
242-
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
243241
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
244242
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
245243
golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY=

common/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ require (
4949
github.com/jackc/pgx/v5 v5.9.2 // indirect
5050
github.com/jackc/puddle/v2 v2.2.2 // indirect
5151
github.com/mattn/go-colorable v0.1.14 // indirect
52-
github.com/mattn/go-isatty v0.0.20 // indirect
52+
github.com/mattn/go-isatty v0.0.21 // indirect
5353
github.com/mattn/go-sqlite3 v1.14.32 // indirect
5454
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
5555
github.com/muhlemmer/gu v0.3.1 // indirect

common/go.sum

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
8585
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
8686
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
8787
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
88-
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
89-
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
88+
github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=
9089
github.com/mattn/go-sqlite3 v1.14.32 h1:JD12Ag3oLy1zQA+BNn74xRgaBbdhbNIDYvQUEuuErjs=
9190
github.com/mattn/go-sqlite3 v1.14.32/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
9291
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
@@ -198,7 +197,6 @@ golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
198197
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
199198
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
200199
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
201-
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
202200
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
203201
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
204202
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=

internal/httpserve/specs/openlane.openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3426,7 +3426,7 @@
34263426
"examples": {
34273427
"error": {
34283428
"value": {
3429-
"error": "Get \"https://www.googleapis.com/oauth2/v2/userinfo?alt=json\u0026prettyPrint=false\": dial tcp: lookup www.googleapis.com: no such host",
3429+
"error": "googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized",
34303430
"error_code": "INVALID_INPUT",
34313431
"success": false
34323432
}

internal/httpserve/specs/openlane.openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2462,7 +2462,7 @@ paths:
24622462
examples:
24632463
error:
24642464
value:
2465-
error: 'Get "https://www.googleapis.com/oauth2/v2/userinfo?alt=json&prettyPrint=false": dial tcp: lookup www.googleapis.com: no such host'
2465+
error: 'googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized'
24662466
error_code: INVALID_INPUT
24672467
success: false
24682468
schema:

internal/integrations/operations/ingest_generated_test.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,17 @@ func TestBuildIngestHeaders(t *testing.T) {
182182
if _, ok := headers.Properties["delivery_id"]; ok {
183183
t.Fatal("expected delivery_id to be omitted when empty")
184184
}
185-
if len(headers.Tags) != 2 {
186-
t.Fatalf("expected 2 tags, got %d", len(headers.Tags))
185+
if len(headers.Tags) != 3 {
186+
t.Fatalf("expected 3 tags, got %d: %v", len(headers.Tags), headers.Tags)
187+
}
188+
if headers.Tags[0] != "def-001" {
189+
t.Fatalf("expected first tag %q, got %q", "def-001", headers.Tags[0])
190+
}
191+
if headers.Tags[1] != "schema_finding" {
192+
t.Fatalf("expected second tag %q, got %q", "schema_finding", headers.Tags[1])
193+
}
194+
if headers.Tags[2] != string(integrationgenerated.IntegrationIngestSourceWebhook) {
195+
t.Fatalf("expected third tag %q, got %q", string(integrationgenerated.IntegrationIngestSourceWebhook), headers.Tags[2])
187196
}
188197
})
189198

@@ -195,11 +204,14 @@ func TestBuildIngestHeaders(t *testing.T) {
195204

196205
headers := buildIngestHeaders(record, metadata)
197206

198-
if len(headers.Tags) != 1 {
199-
t.Fatalf("expected 1 tag, got %d: %v", len(headers.Tags), headers.Tags)
207+
if len(headers.Tags) != 2 {
208+
t.Fatalf("expected 2 tags, got %d: %v", len(headers.Tags), headers.Tags)
209+
}
210+
if headers.Tags[0] != "" {
211+
t.Fatalf("expected first tag to be empty definition id, got %q", headers.Tags[0])
200212
}
201-
if headers.Tags[0] != "asset" {
202-
t.Fatalf("expected tag %q, got %q", "asset", headers.Tags[0])
213+
if headers.Tags[1] != "schema_asset" {
214+
t.Fatalf("expected second tag %q, got %q", "schema_asset", headers.Tags[1])
203215
}
204216
})
205217
}

0 commit comments

Comments
 (0)