-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16462 from github/mbg/go/add-resolve-env-tests
Go: Add tests for `resolve build-environment`
- Loading branch information
Showing
33 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/bazel-sample-1/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/bazel-sample-2/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...latforms/go/diagnostics/build-constraints-exclude-all-go-files/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...ests/all-platforms/go/diagnostics/go-files-found-not-processed/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...n-tests/all-platforms/go/diagnostics/invalid-toolchain-version/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...ion-tests/all-platforms/go/diagnostics/newer-go-version-needed/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...tegration-tests/all-platforms/go/diagnostics/no-go-files-found/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...sts/all-platforms/go/diagnostics/package-not-found-with-go-mod/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
.../all-platforms/go/diagnostics/package-not-found-without-go-mod/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...n-tests/all-platforms/go/diagnostics/unsupported-relative-path/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...tegration-tests/all-platforms/go/go-get-without-modules-sample/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/go-mod-sample/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/go-mod-without-version/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/go-version-bump/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/make-sample/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/mixed-layout/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/ninja-sample/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...sts/all-platforms/go/resolve-build-environment/newer-go-needed/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { | ||
"version" : "1.22" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...ion-tests/all-platforms/go/resolve-build-environment/newer-go-needed/diagnostics.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"location": { | ||
"file": "go.mod" | ||
}, | ||
"markdownMessage": "As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://go.dev/doc/toolchain#version).\n\n`1.22` in `go.mod` does not match this syntax and there is no additional `toolchain` directive, which may cause some `go` commands to fail.", | ||
"severity": "warning", | ||
"source": { | ||
"extractorName": "go", | ||
"id": "go/autobuilder/invalid-go-toolchain-version", | ||
"name": "Invalid Go toolchain version" | ||
}, | ||
"visibility": { | ||
"cliSummaryTable": true, | ||
"statusPage": true, | ||
"telemetry": true | ||
} | ||
} | ||
{ | ||
"markdownMessage": "A single `go.mod` file was found.\n\n`go.mod`", | ||
"severity": "note", | ||
"source": { | ||
"extractorName": "go", | ||
"id": "go/autobuilder/single-root-go-mod-found", | ||
"name": "A single `go.mod` file was found in the root" | ||
}, | ||
"visibility": { | ||
"cliSummaryTable": false, | ||
"statusPage": false, | ||
"telemetry": true | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...l/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
go 1.22 | ||
|
||
module main |
3 changes: 3 additions & 0 deletions
3
.../integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package main | ||
|
||
func Main() {} |
3 changes: 3 additions & 0 deletions
3
go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from go_integration_test import * | ||
|
||
go_integration_test(toolchain="go1.21.0") |
5 changes: 5 additions & 0 deletions
5
...tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...l/integration-tests/all-platforms/go/single-go-mod-not-in-root/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
.../integration-tests/all-platforms/go/single-go-work-not-in-root/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...gration-tests/all-platforms/go/two-go-mods-nested-none-in-root/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...egration-tests/all-platforms/go/two-go-mods-nested-one-in-root/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/linux-only/go/dep-sample/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
go/ql/integration-tests/linux-only/go/glide-sample/build-environment.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"configuration" : { | ||
"go" : { } | ||
} | ||
} |