Skip to content

Commit

Permalink
Mark tests using libsodiumjni as Flaky on non-M1 MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejG604 committed Dec 21, 2023
1 parent 26a39f4 commit f7465a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,20 @@ class GitHubTests extends ScalaCliSuite {
}
}

override def munitFlakyOK =
TestUtil.isCI && TestUtil.isNativeCli && Properties.isMac && !TestUtil.isM1

// currently having issues loading libsodium from the static launcher
// that launcher is mainly meant to be used on CIs or from docker, missing
// that feature shouldn't be a big deal there
if (TestUtil.cliKind != "native-static")
test("create secret") {
createSecretTest()
test("create secret".flaky) {
try
createSecretTest()
catch {
case e: UnsatisfiedLinkError if e.getMessage.contains("libsodium") =>
fail("libsodium, couldn't be loaded")
}
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.eclipse.jgit.api.Git
import org.eclipse.jgit.transport.URIish

import scala.jdk.CollectionConverters.*
import scala.util.Properties
import scala.util.matching.Regex

class PublishSetupTests extends ScalaCliSuite {
Expand Down Expand Up @@ -89,6 +90,9 @@ class PublishSetupTests extends ScalaCliSuite {
.toMap
}

override def munitFlakyOK =
TestUtil.isCI && TestUtil.isNativeCli && Properties.isMac && !TestUtil.isM1

test("local") {
val expectedDirectives = Map(
"publish.versionControl" -> Seq(s"github:$ghUserName/tests"),
Expand Down Expand Up @@ -131,7 +135,7 @@ class PublishSetupTests extends ScalaCliSuite {
}
}

test("CI") {
test("CI".flaky) {
val expectedDirectives = Map(
"publish.versionControl" -> List(s"github:$ghUserName/tests"),
"publish.organization" -> List(s"io.github.$ghUserName"),
Expand Down Expand Up @@ -184,7 +188,7 @@ class PublishSetupTests extends ScalaCliSuite {
}
}

test("CI repository default") {
test("CI repository default".flaky) {

testInputs.fromRoot { root =>
configSetup(root / configFile, root)
Expand Down Expand Up @@ -303,7 +307,7 @@ class PublishSetupTests extends ScalaCliSuite {
}
}

test("CI GitHub") {
test("CI GitHub".flaky) {
val expectedDirectives = Map(
"publish.versionControl" -> List(s"github:$ghUserName/tests"),
"publish.organization" -> List(s"io.github.$ghUserName"),
Expand Down

0 comments on commit f7465a2

Please sign in to comment.