Commit 346881d7 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Add Moodle 3.9 versions (Moodle and Workplace) information

parent 3cc449dd
package org.moodle.ci.versions;
class M39 extends Version {
M39() {
this.name = "39"
this.defaultBranch = "MOODLE_39_STABLE"
this.supportedPHPVersions = [
"7.2",
"7.3",
"7.4",
]
this.supportedDatabases = [
"pgsql",
"mysqli",
"mariadb",
"sqlsrv",
"oci",
]
}
}
package org.moodle.ci.versions;
class WP39 extends Version {
WP39() {
this.name = "39"
this.defaultBranch = "WORKPLACE_39_LATEST"
this.supportedPHPVersions = [
"7.2",
"7.3",
"7.4",
]
this.supportedDatabases = [
"pgsql",
"mysqli",
"mariadb",
"sqlsrv",
"oci",
]
}
}
package test.org.moodle.ci.versions;
import spock.lang.Specification
class M39 extends Specification {
def "getDefaultBranch returns MOODLE_39_STABLE"() {
given:
def moodleVersion = new org.moodle.ci.versions.M39()
when:
def output = moodleVersion.getDefaultBranch()
then:
assert output == "MOODLE_39_STABLE"
}
def "defaultBranch returns MOODLE_39_STABLE"() {
given:
def moodleVersion = new org.moodle.ci.versions.M39()
when:
def output = moodleVersion.defaultBranch
then:
assert output == "MOODLE_39_STABLE"
}
def "getPhpVersions"() {
given:
def moodleVersion = new org.moodle.ci.versions.M39()
when:
def output = moodleVersion.getPhpVersions()
then:
assert output.sort() == ['7.2', '7.3', '7.4'].sort()
}
def "getHighestSupportedVersion is 7.4"() {
given:
def moodleVersion = new org.moodle.ci.versions.M39()
when:
def output = moodleVersion.getHighestSupportedVersion()
then:
assert output == '7.4'
}
def "getLowestSupportedVersion is 7.2"() {
given:
def moodleVersion = new org.moodle.ci.versions.M39()
when:
def output = moodleVersion.getLowestSupportedVersion()
then:
assert output == '7.2'
}
def "getDatabases"() {
given:
def moodleVersion = new org.moodle.ci.versions.M39()
when:
def output = moodleVersion.getDatabases()
then:
assert output.sort() == [
"mariadb",
"mysqli",
"oci",
"pgsql",
"sqlsrv",
].sort()
}
def "name matches"() {
given:
def moodleVersion = new org.moodle.ci.versions.M39()
when:
def output = moodleVersion.name
then:
assert output == "39"
}
}
package test.org.moodle.ci.versions;
import spock.lang.Specification
class WP39 extends Specification {
def "getDefaultBranch returns WORKPLACE_39_LATEST"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP39()
when:
def output = workplaceVersion.getDefaultBranch()
then:
assert output == "WORKPLACE_39_LATEST"
}
def "defaultBranch returns WORKPLACE_39_LATEST"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP39()
when:
def output = workplaceVersion.defaultBranch
then:
assert output == "WORKPLACE_39_LATEST"
}
def "getPhpVersions"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP39()
when:
def output = workplaceVersion.getPhpVersions()
then:
assert output.sort() == ['7.2', '7.3', '7.4'].sort()
}
def "getHighestSupportedVersion is 7.4"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP39()
when:
def output = workplaceVersion.getHighestSupportedVersion()
then:
assert output == '7.4'
}
def "getLowestSupportedVersion is 7.2"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP39()
when:
def output = workplaceVersion.getLowestSupportedVersion()
then:
assert output == '7.2'
}
def "getDatabases"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP39()
when:
def output = workplaceVersion.getDatabases()
then:
assert output.sort() == [
"mariadb",
"mysqli",
"oci",
"pgsql",
"sqlsrv",
].sort()
}
def "name matches"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP39()
when:
def output = workplaceVersion.name
then:
assert output == "39"
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment