Skip to content

Commit

Permalink
improved integration tests a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
lbialy committed Jul 21, 2024
1 parent a58465a commit 11711c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github/ @lbialy @tgodzik
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jobs:
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

documentation:
needs: test
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/downloadYamlConfigs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ do

done

mkdir ./test-suite/jvm/src/it/resources/yaml/configs/
find ./repositories -name '*.yaml' -exec cp -prv '{}' './test-suite/jvm/src/it/resources/yaml/configs/' ';'
mkdir -p ./src/test/resources/yaml/configs/
find ./repositories -name '*.yaml' -exec cp -prv '{}' './src/test/resources/yaml/configs/' ';'

LIB_YAML_PATH="" # Set the path to libyaml

# In downloaded repositories contains some invalid yaml, below instructions can remove this yaml
for f in ./test-suite/jvm/src/it/resources/yaml/configs/*.yaml; do
for f in ./src/test/resources/yaml/configs/*.yaml; do
cat $f | $LIB_YAML_PATH >/dev/null

# if libyaml return error exit code, these means, that yaml is invalid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ abstract class YamlRunnerSpec extends munit.FunSuite {
val verbose = false
val predicate: os.Path => Boolean = _ => true

val yamlDirPath = getClass.getResource(resourcePath)
val yamlDirPath = getClass.getResource(resourcePath)
if (yamlDirPath == null) {
throw new IllegalArgumentException(
s"Resource $resourcePath not found, run integrations-tests/downloadYamlConfigs.sh first!"
)
}
val yamlDir = new File(yamlDirPath.getPath)
val yamlPaths: List[os.Path] = yamlDir.listFiles().map(os.Path(_)).filter(predicate).toList

Expand Down

0 comments on commit 11711c8

Please sign in to comment.