File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,15 @@ function setup() {
39
39
refute_output --partial " Uncaught error:"
40
40
}
41
41
42
- @test " IDRIS_SHA should be set " {
42
+ @test " Check environment variables " {
43
43
# make sure IDRIS_SHA is set
44
44
# https://bats-core.readthedocs.io/en/stable/writing-tests.html#run-test-other-commands
45
45
# expects the cmd to return 0
46
46
if [[ $IDRIS_VERSION != " latest" ]]; then
47
- skip " IDRIS_VERSION is not latest"
47
+ # For versions that are not latest, IDRIS_VERSION should be set
48
+ docker run $DOCKER_IMAGE bash -c " if [[ -z \$ IDRIS_VERSION ]]; then exit 1; else exit 0; fi"
49
+ else
50
+ # For latest, IDRIS_SHA should be set
51
+ docker run $DOCKER_IMAGE bash -c " if [[ -z \$ IDRIS_SHA ]]; then exit 1; else exit 0; fi"
48
52
fi
49
-
50
- docker run $DOCKER_IMAGE bash -c " if [[ -z \$ IDRIS_SHA ]]; then exit 1; else exit 0; fi"
51
53
}
Original file line number Diff line number Diff line change @@ -36,4 +36,17 @@ function setup() {
36
36
# the ENTRYPOINT is already the `idris2` command, so we just `docker run` without any other stuff
37
37
run docker run $DOCKER_IMAGE
38
38
refute_output --partial " Uncaught error:"
39
+ }
40
+
41
+ @test " Check environment variables" {
42
+ # make sure IDRIS_SHA is set
43
+ # https://bats-core.readthedocs.io/en/stable/writing-tests.html#run-test-other-commands
44
+ # expects the cmd to return 0
45
+ if [[ $IDRIS_VERSION != " latest" ]]; then
46
+ # For versions that are not latest, IDRIS_VERSION should be set
47
+ docker run $DOCKER_IMAGE bash -c " if [[ -z \$ IDRIS_VERSION ]]; then exit 1; else exit 0; fi"
48
+ else
49
+ # For latest, IDRIS_SHA should be set
50
+ docker run $DOCKER_IMAGE bash -c " if [[ -z \$ IDRIS_SHA ]]; then exit 1; else exit 0; fi"
51
+ fi
39
52
}
Original file line number Diff line number Diff line change @@ -35,4 +35,17 @@ function setup() {
35
35
36
36
run docker run $DOCKER_IMAGE idris2
37
37
refute_output --partial " Uncaught error:"
38
+ }
39
+
40
+ @test " Check environment variables" {
41
+ # make sure IDRIS_SHA is set
42
+ # https://bats-core.readthedocs.io/en/stable/writing-tests.html#run-test-other-commands
43
+ # expects the cmd to return 0
44
+ if [[ $IDRIS_VERSION != " latest" ]]; then
45
+ # For versions that are not latest, IDRIS_VERSION should be set
46
+ docker run $DOCKER_IMAGE bash -c " if [[ -z \$ IDRIS_LSP_VERSION ]]; then exit 1; else exit 0; fi"
47
+ else
48
+ # For latest, IDRIS_SHA should be set
49
+ docker run $DOCKER_IMAGE bash -c " if [[ -z \$ IDRIS_LSP_SHA ]]; then exit 1; else exit 0; fi"
50
+ fi
38
51
}
You can’t perform that action at this time.
0 commit comments