This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / spindle / engines / microvm / placement / placement_test.go
690 B 26 lines
1package placement 2 3import ( 4 "testing" 5) 6 7func TestIsNativeArchitecture(t *testing.T) { 8 tests := []struct { 9 image string 10 host string 11 want bool 12 }{ 13 {image: "x86_64", host: "amd64", want: true}, 14 {image: "amd64", host: "amd64", want: true}, 15 {image: "aarch64", host: "arm64", want: true}, 16 {image: "arm64", host: "arm64", want: true}, 17 {image: "x86_64", host: "arm64", want: false}, 18 {image: "aarch64", host: "amd64", want: false}, 19 {image: "", host: "amd64", want: false}, 20 } 21 for _, tt := range tests { 22 if got := IsNativeArchitecture(tt.image, tt.host); got != tt.want { 23 t.Errorf("IsNativeArchitecture(%q, %q) = %v, want %v", tt.image, tt.host, got, tt.want) 24 } 25 } 26}