Skip to content
GitLab
Menu
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
346881d7
Commit
346881d7
authored
Jun 09, 2020
by
Eloy Lafuente
Browse files
Add Moodle 3.9 versions (Moodle and Workplace) information
parent
3cc449dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/org/moodle/ci/versions/M39.groovy
0 → 100644
View file @
346881d7
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"
,
]
}
}
src/org/moodle/ci/versions/WP39.groovy
0 → 100644
View file @
346881d7
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"
,
]
}
}
test/org/moodle/ci/versions/M39.groovy
0 → 100644
View file @
346881d7
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"
}
}
test/org/moodle/ci/versions/WP39.groovy
0 → 100644
View file @
346881d7
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"
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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