Skip to content

Commit 11711c8

Browse files
committed
improved integration tests a little bit
1 parent a58465a commit 11711c8

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.github/ @lbialy @tgodzik

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ jobs:
6161
env:
6262
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
6363
PGP_SECRET: ${{ secrets.PGP_SECRET }}
64-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
65-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
6664

6765
documentation:
6866
needs: test

integration-tests/downloadYamlConfigs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ do
2626

2727
done
2828

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

3232
LIB_YAML_PATH="" # Set the path to libyaml
3333

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

3838
# if libyaml return error exit code, these means, that yaml is invalid

integration-tests/src/test/scala/org/virtuslab/yaml/YamlRunnerSpec.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ abstract class YamlRunnerSpec extends munit.FunSuite {
1010
val verbose = false
1111
val predicate: os.Path => Boolean = _ => true
1212

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

0 commit comments

Comments
 (0)