Skip to content

Commit 220052c

Browse files
authored
Merge pull request #53 from infosiftr/oci-platform-test
Add very basic "oci-platform" string test
2 parents 634e28f + d0452fb commit 220052c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

architecture/oci-platform_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package architecture_test
2+
3+
import (
4+
"testing"
5+
6+
"github.com/docker-library/bashbrew/architecture"
7+
)
8+
9+
func TestString(t *testing.T) {
10+
tests := map[string]string{
11+
"amd64": "linux/amd64",
12+
"arm32v6": "linux/arm/v6",
13+
"windows-amd64": "windows/amd64",
14+
}
15+
for arch, platform := range tests {
16+
t.Run(arch, func(t *testing.T) {
17+
oci := architecture.SupportedArches[arch]
18+
if ociPlatform := oci.String(); platform != ociPlatform {
19+
t.Errorf("expected %q; got %q", platform, ociPlatform)
20+
}
21+
})
22+
}
23+
}

0 commit comments

Comments
 (0)