This repository has been archived by the owner on Mar 30, 2023. It is now read-only.
forked from opencadc/cadc-vosui
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
118 lines (97 loc) · 3.81 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
plugins {
id 'war'
// IntelliJ IDEA plugin here to allow integration tests to appear properly in IDEs.
id 'idea'
}
repositories {
mavenCentral()
mavenLocal()
maven {
url "https://maven.restlet.talend.com"
}
}
dependencies {
implementation 'org.freemarker:freemarker:[2.3.31,2.4.0)'
implementation 'org.apache.commons:commons-lang3:[3.11,4.0)'
implementation 'org.opencadc:cadc-log:[1.1.5,2.0)'
implementation 'org.opencadc:cadc-util:[1.6.0,2.0)'
implementation 'org.opencadc:cadc-vosui:[1.2.12,1.3.0)'
implementation 'org.opencadc:cadc-registry:[1.5.15,2.0)'
implementation 'org.restlet.jee:org.restlet:[2.4.3,2.4.99)'
testImplementation 'junit:junit:[4.12,5.0)'
testImplementation 'org.opencadc:cadc-web-test:[2.1.1,3.0.0)'
testImplementation 'org.seleniumhq.selenium:selenium-java:[3.14,4.0)'
}
sourceCompatibility = '1.8'
war {
archiveName 'storage.war'
}
ext {
// VOSpace service values. Change alt_vospace_service if necessary
// to match a configured service in org.opencadc.vosui.properties
intTest_default_vospace_service = 'vault'
intTest_alt_vospace_service = 'arc'
}
sourceSets {
intTest
}
configurations {
intTestImplementation
intTestImplementation.extendsFrom(testImplementation)
}
idea {
module {
//and some extra test source dirs
testSourceDirs += file('src/intTest/java')
}
}
['firefox', 'chrome'].each { driver ->
task "intTest${driver.capitalize()}"(type: Test) { driverTest ->
testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath
reports {
html.destination = reporting.file("$name/html")
}
dependencies {
intTestImplementation 'junit:junit:[4.12,5.0)'
intTestImplementation 'org.opencadc:cadc-web-test:[2.1.1,3.0.0)'
intTestImplementation 'org.seleniumhq.selenium:selenium-java:[3.14,4.0)'
}
systemProperty "driver", "${driver}"
if (!project.hasProperty('intTest_selenium_server_url')) {
systemProperty 'selenium.server.url', 'http://mach378.cadc.dao.nrc.ca:4444'
}
else {
systemProperty 'selenium.server.url', project.intTest_selenium_server_url
logger.info('Running browser tests on ' + project.intTest_selenium_server_url)
}
if (!project.hasProperty('intTest_web_app_url')) {
System.err.println("Please set the intTest_web_app_url property (-PintTest_web_app_url=https://www...).")
} else {
systemProperty 'web.app.url', project.intTest_web_app_url
}
if (!project.hasProperty('intTest_user_name')) {
System.err.println("Please set the intTest_user_name property (-PintTest_user_name=cadcuser).")
} else {
systemProperty 'user.name', project.intTest_user_name
}
if (!project.hasProperty('intTest_user_password')) {
System.err.println("Please set the intTest_user_password property (-intTest_user_password=1234pw).")
} else {
systemProperty 'user.password', project.intTest_user_password
}
if (project.hasProperty('intTest_directory')) {
systemProperty 'test.directory', project.intTest_directory
} else {
logger.info("Using default directory in VOSpace.")
}
if (project.hasProperty('intTest_alt_home_directory')) {
systemProperty 'test.alt_home_directory', project.intTest_alt_home_directory
} else {
logger.info("Using default home directory in arc.")
}
systemProperty 'test.default_vospace', project.intTest_default_vospace_service
systemProperty 'test.alt_vospace', project.intTest_alt_vospace_service
maxParallelForks = 1
}
}