Compile packages for selected targets
This commit is contained in:
@@ -9,11 +9,23 @@ import (
|
||||
|
||||
func TestCandidateRequestMapsGoValidation(t *testing.T) {
|
||||
request := candidateRequest(ReleaseRequest{
|
||||
Validation: ValidationSpec{Go: GoValidationSpec{Race: true, FullVet: true}},
|
||||
Validation: ValidationSpec{Go: GoValidationSpec{
|
||||
Race: true, FullVet: true,
|
||||
CompileTargets: []Target{{OS: "linux", Arch: "amd64"}, {OS: "darwin", Arch: "arm64"}},
|
||||
}},
|
||||
})
|
||||
if !request.Validation.Race || !request.Validation.FullVet {
|
||||
t.Fatalf("candidate request validation = %#v, want race and full vet enabled", request.Validation)
|
||||
}
|
||||
want := []validation.Target{{OS: "linux", Arch: "amd64"}, {OS: "darwin", Arch: "arm64"}}
|
||||
if len(request.Validation.CompileTargets) != len(want) {
|
||||
t.Fatalf("candidate request compile targets = %#v, want %#v", request.Validation.CompileTargets, want)
|
||||
}
|
||||
for index := range want {
|
||||
if request.Validation.CompileTargets[index] != want[index] {
|
||||
t.Fatalf("candidate request compile targets = %#v, want %#v", request.Validation.CompileTargets, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidationErrorPreservesGoVetIdentity(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user