-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and update the docker + bats based tests #413
base: master
Are you sure you want to change the base?
Conversation
f26cd9f
to
ad07fa2
Compare
test/Dockerfile
Outdated
RUN yum install -y java-11-openjdk | ||
RUN yum install -y java-1.7.0-openjdk | ||
RUN yum install -y java-1.8.0-openjdk | ||
RUN curl -L https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.3/graalvm-ce-java11-linux-$(arch)-22.3.3.tar.gz | tar xzf - -C /usr/lib/jvm/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If $(arch)
is x86_64
should get amd64
test/adding_jdks.bats
Outdated
@test "add openjdk 1.8.0.372" { | ||
jenv add /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.372.b07-1.el7_9.$_ARCH/jre/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably make this and other add commands not depend on build version as tests are brittle - some of these are out of date again e.g.
@test "add openjdk 1.8.0.372" { | |
jenv add /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.372.b07-1.el7_9.$_ARCH/jre/ | |
@test "add openjdk 1.8.0" { | |
jenv add /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.*.el7_9.$_ARCH/jre/ |
test/adding_jdks.bats
Outdated
assert_line --regexp '^ *1.8.0.372$' | ||
assert_line --regexp '^ *openjdk64-1.8.0.372$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As other comment should make these and other assertions not depend on build version as tests are brittle and some of these are out of date again
assert_line --regexp '^ *1.8.0.372$' | |
assert_line --regexp '^ *openjdk64-1.8.0.372$' | |
assert_line --regexp '^ *1.8.0.[0-9]+$' | |
assert_line --regexp '^ *openjdk64-1.8.0.[0-9]+$' |
This should ensure that tests will not break over time.
Also removed the unused _ARCH var from the test suite_setup.
Removed unnecessary subshell creations.
In order to make tests green the following needed to be done:
adding_jdks.bats
testssetting_versions.bats
testsAdditionally I added some improvements:
setup
into:setup_suite
,setup
andteardown
setting_versions.bats
Fixes #411