From b98fda8303142e5799995bf5770fd2e7208414e1 Mon Sep 17 00:00:00 2001 From: "Andrew J. Thom" Date: Tue, 15 Dec 2020 15:35:19 -0600 Subject: [PATCH] add support for apple silicon... add a test case --- .../maven/plugins/frontend/lib/PlatformTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend-plugin-core/src/test/java/com/github/eirslett/maven/plugins/frontend/lib/PlatformTest.java b/frontend-plugin-core/src/test/java/com/github/eirslett/maven/plugins/frontend/lib/PlatformTest.java index ca8eefa5f..81b8cb01d 100644 --- a/frontend-plugin-core/src/test/java/com/github/eirslett/maven/plugins/frontend/lib/PlatformTest.java +++ b/frontend-plugin-core/src/test/java/com/github/eirslett/maven/plugins/frontend/lib/PlatformTest.java @@ -31,6 +31,18 @@ public void detect_win_doesntLookForAlpine() { verifyNoMoreInteractions(File.class); // doesn't look for a file path } + @Test + public void detect_arm_mac_download_x64_binary() { + mockStatic(OS.class); + mockStatic(Architecture.class); + + when(OS.guess()).thenReturn(OS.Mac); + when(Architecture.guess()).thenReturn(Architecture.arm64); + + Platform platform = Platform.guess(); + assertEquals("darwin-x64", platform.getNodeClassifier()); + } + @Test public void detect_linux_notAlpine() throws Exception { mockStatic(OS.class);