Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrew Lyons
pipeline
Commits
5fc2a2d1
Commit
5fc2a2d1
authored
Nov 13, 2020
by
Eloy Lafuente
Browse files
Add Moodle 3.11 versions (Moodle and Workplace) information
parent
34fce6b1
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/org/moodle/ci/versions/M311.groovy
0 → 100644
View file @
5fc2a2d1
package
org.moodle.ci.versions
;
class
M311
extends
Version
{
M311
()
{
this
.
name
=
"311"
this
.
defaultBranch
=
"MOODLE_311_STABLE"
this
.
supportedPHPVersions
=
[
"7.2"
,
"7.3"
,
"7.4"
,
]
this
.
supportedDatabases
=
[
"pgsql"
,
"mysqli"
,
"mariadb"
,
"sqlsrv"
,
"oci"
,
]
}
}
src/org/moodle/ci/versions/WP311.groovy
0 → 100644
View file @
5fc2a2d1
package
org.moodle.ci.versions
;
class
WP311
extends
Version
{
WP311
()
{
this
.
name
=
"311"
this
.
defaultBranch
=
"WORKPLACE_311_LATEST"
this
.
supportedPHPVersions
=
[
"7.2"
,
"7.3"
,
"7.4"
,
]
this
.
supportedDatabases
=
[
"pgsql"
,
"mysqli"
,
"mariadb"
,
"sqlsrv"
,
"oci"
,
]
}
}
test/org/moodle/ci/versions/M311.groovy
0 → 100644
View file @
5fc2a2d1
package
test.org.moodle.ci.versions
;
import
spock.lang.Specification
class
M311
extends
Specification
{
def
"getDefaultBranch returns MOODLE_311_STABLE"
()
{
given:
def
moodleVersion
=
new
org
.
moodle
.
ci
.
versions
.
M311
()
when:
def
output
=
moodleVersion
.
getDefaultBranch
()
then:
assert
output
==
"MOODLE_311_STABLE"
}
def
"defaultBranch returns MOODLE_311_STABLE"
()
{
given:
def
moodleVersion
=
new
org
.
moodle
.
ci
.
versions
.
M311
()
when:
def
output
=
moodleVersion
.
defaultBranch
then:
assert
output
==
"MOODLE_311_STABLE"
}
def
"getPhpVersions"
()
{
given:
def
moodleVersion
=
new
org
.
moodle
.
ci
.
versions
.
M311
()
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
.
M311
()
when:
def
output
=
moodleVersion
.
getHighestSupportedVersion
()
then:
assert
output
==
'7.4'
}
def
"getLowestSupportedVersion is 7.2"
()
{
given:
def
moodleVersion
=
new
org
.
moodle
.
ci
.
versions
.
M311
()
when:
def
output
=
moodleVersion
.
getLowestSupportedVersion
()
then:
assert
output
==
'7.2'
}
def
"getDatabases"
()
{
given:
def
moodleVersion
=
new
org
.
moodle
.
ci
.
versions
.
M311
()
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
.
M311
()
when:
def
output
=
moodleVersion
.
name
then:
assert
output
==
"311"
}
}
test/org/moodle/ci/versions/WP311.groovy
0 → 100644
View file @
5fc2a2d1
package
test.org.moodle.ci.versions
;
import
spock.lang.Specification
class
WP311
extends
Specification
{
def
"getDefaultBranch returns WORKPLACE_311_LATEST"
()
{
given:
def
workplaceVersion
=
new
org
.
moodle
.
ci
.
versions
.
WP311
()
when:
def
output
=
workplaceVersion
.
getDefaultBranch
()
then:
assert
output
==
"WORKPLACE_311_LATEST"
}
def
"defaultBranch returns WORKPLACE_311_LATEST"
()
{
given:
def
workplaceVersion
=
new
org
.
moodle
.
ci
.
versions
.
WP311
()
when:
def
output
=
workplaceVersion
.
defaultBranch
then:
assert
output
==
"WORKPLACE_311_LATEST"
}
def
"getPhpVersions"
()
{
given:
def
workplaceVersion
=
new
org
.
moodle
.
ci
.
versions
.
WP311
()
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
.
WP311
()
when:
def
output
=
workplaceVersion
.
getHighestSupportedVersion
()
then:
assert
output
==
'7.4'
}
def
"getLowestSupportedVersion is 7.2"
()
{
given:
def
workplaceVersion
=
new
org
.
moodle
.
ci
.
versions
.
WP311
()
when:
def
output
=
workplaceVersion
.
getLowestSupportedVersion
()
then:
assert
output
==
'7.2'
}
def
"getDatabases"
()
{
given:
def
workplaceVersion
=
new
org
.
moodle
.
ci
.
versions
.
WP311
()
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
.
WP311
()
when:
def
output
=
workplaceVersion
.
name
then:
assert
output
==
"311"
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment