Skip to content

Commit

Permalink
Remove extra fromRoot clause
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejG604 committed Mar 31, 2023
1 parent 25ffee2 commit c1bd87d
Showing 1 changed file with 32 additions and 34 deletions.
Expand Up @@ -486,40 +486,38 @@ abstract class PublishTestDefinitions(val scalaVersionOpt: Option[String])
"some_email"
).call(cwd = root, env = extraEnv)

TestCase.testInputs.fromRoot { root =>
os.proc(
TestUtil.cli,
"--power",
"publish",
extraOptions,
"--secret-key",
"value:INCORRECT_KEY",
"--signer",
"none",
"project",
"-R",
"test-repo"
).call(
cwd = root,
stdin = os.Inherit,
stdout = os.Inherit,
env = extraEnv
)

val files = os.walk(root / "test-repo")
.filter(os.isFile(_))
.map(_.relativeTo(root / "test-repo"))
val notInDir = files.filter(!_.startsWith(TestCase.expectedArtifactsDir))
expect(notInDir.isEmpty)

val files0 = files.map(_.relativeTo(TestCase.expectedArtifactsDir)).toSet

val expectedArtifactsNotSigned = expectedArtifacts.filterNot(_.last.contains(".asc"))

expect((files0 -- expectedArtifactsNotSigned).isEmpty)
expect((expectedArtifactsNotSigned -- files0).isEmpty)
expect(files0 == expectedArtifactsNotSigned) // just in case…
}
os.proc(
TestUtil.cli,
"--power",
"publish",
extraOptions,
"--secret-key",
"value:INCORRECT_KEY",
"--signer",
"none",
"project",
"-R",
"test-repo"
).call(
cwd = root,
stdin = os.Inherit,
stdout = os.Inherit,
env = extraEnv
)

val files = os.walk(root / "test-repo")
.filter(os.isFile(_))
.map(_.relativeTo(root / "test-repo"))
val notInDir = files.filter(!_.startsWith(TestCase.expectedArtifactsDir))
expect(notInDir.isEmpty)

val files0 = files.map(_.relativeTo(TestCase.expectedArtifactsDir)).toSet

val expectedArtifactsNotSigned = expectedArtifacts.filterNot(_.last.contains(".asc"))

expect((files0 -- expectedArtifactsNotSigned).isEmpty)
expect((expectedArtifactsNotSigned -- files0).isEmpty)
expect(files0 == expectedArtifactsNotSigned) // just in case…
}
}
}

0 comments on commit c1bd87d

Please sign in to comment.