github.com/quay/claircore@v1.5.28/test/integration/fixup_other.go (about) 1 //go:build !linux 2 3 package integration 4 5 import ( 6 "runtime" 7 ) 8 9 func findArch() (arch string) { 10 arch = runtime.GOARCH 11 ok := false 12 switch runtime.GOOS { 13 case "darwin": 14 switch arch { 15 case "arm64": 16 arch += "v8" 17 fallthrough 18 case "amd64": // OK 19 ok = true 20 default: 21 } 22 case "windows": 23 switch arch { 24 case "amd64": // OK 25 ok = true 26 default: 27 } 28 default: 29 } 30 if !ok { 31 // Will cause the [startEmbedded] function to print a warning and fail 32 // the test if the environment requires an embedded database. 33 return "" 34 } 35 return arch 36 }