Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/SHIBUI-2146-attribute-success-alert
Browse files Browse the repository at this point in the history
Former-commit-id: cbc801dc014e5f238475086b0d849384d7b747ff
  • Loading branch information
rmathis committed Aug 2, 2022
2 parents be660ed + c050260 commit 7fca767
Show file tree
Hide file tree
Showing 104 changed files with 2,600 additions and 1,906 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,6 @@ beacon/spring/out

# macOS jenv
.java-version
/a.xml
/application.yml
/backend/src/test/resources/conf/deletem.xml
28 changes: 1 addition & 27 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,6 @@ pipeline {
}
}
}

stage('Build Docker images') {
when {
expression {
return GIT_BRANCH in ['master']
}
}
steps {
sh '''./gradlew docker -x test
'''
}
}

stage('Deploy') {
when {
expression {
return GIT_BRANCH in ['master']
}
}
steps {
sh '''
docker stop shibui || true && docker rm shibui || true
docker run -d --restart always --name shibui -p 8080:8080 -v /etc/shibui:/conf -v /etc/shibui/application.yml:/application.yml -m 2GB --memory-swap=4GB --entrypoint /usr/bin/java unicon/shibui:latest -Xmx1G -jar app.war
'''
}
}
}
post {
failure {
Expand All @@ -54,4 +28,4 @@ pipeline {
cleanWs()
}
}
}
}
7 changes: 4 additions & 3 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ dependencies {
runtimeOnly 'org.glassfish.jaxb:jaxb-runtime:2.3.0'

compile "com.h2database:h2"
runtimeOnly 'org.postgresql:postgresql:42.3.4'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.0.4'
runtimeOnly 'mysql:mysql-connector-java:8.0.29'
runtimeOnly "org.postgresql:postgresql:${project.'postgresVersion'}"
runtimeOnly "org.mariadb.jdbc:mariadb-java-client:${project.'mariadbVersion'}"
runtimeOnly "mysql:mysql-connector-java:${project.'mysqlVersion'}"
runtimeOnly "com.microsoft.sqlserver:mssql-jdbc:${project.'sqlserverVersion'}"

//Swagger 3
implementation 'org.springdoc:springdoc-openapi-ui:1.6.8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.LocalDynamicMetad
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ReloadableMetadataResolverAttributes
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.ResourceBackedMetadataResolver
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.TemplateScheme
import edu.internet2.tier.shibboleth.admin.ui.opensaml.OpenSamlObjects
import edu.internet2.tier.shibboleth.admin.ui.repository.MetadataResolverRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.domain.EntityScan
Expand Down Expand Up @@ -269,7 +268,7 @@ class MetadataResolverEnversVersioningTests extends Specification {
when:
ResourceBackedMetadataResolver resolver = new ResourceBackedMetadataResolver(name: 'rbmr').with {
it.reloadableMetadataResolverAttributes = new ReloadableMetadataResolverAttributes(taskTimerRef: 'taskTimerRef')
it.classpathMetadataResource = new ClasspathMetadataResource(file: 'metadata.xml')
it.classpathMetadataResource = new ClasspathMetadataResource(fileResource: 'metadata.xml')
it
}

Expand All @@ -283,15 +282,15 @@ class MetadataResolverEnversVersioningTests extends Specification {
resolverHistory.size() == 1
getTargetEntityForRevisionIndex(resolverHistory, 0).name == 'rbmr'
getTargetEntityForRevisionIndex(resolverHistory, 0).reloadableMetadataResolverAttributes.taskTimerRef == 'taskTimerRef'
getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.file == 'metadata.xml'
getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.fileResource == 'metadata.xml'
getRevisionEntityForRevisionIndex(resolverHistory, 0).principalUserName == 'anonymousUser'
getRevisionEntityForRevisionIndex(resolverHistory, 0).timestamp > 0L
getModifiedEntityNames(resolverHistory, 0).sort() == expectedModifiedPersistentEntities.sort()

when:
resolver.name = 'rbmrUPDATED'
resolver.reloadableMetadataResolverAttributes.taskTimerRef = 'taskTimerRefUPDATED'
resolver.classpathMetadataResource.file = 'metadataUPDATED.xml'
resolver.classpathMetadataResource.fileResource = 'metadataUPDATED.xml'

resolverHistory = updateAndGetRevisionHistoryOfMetadataResolver(resolver,
metadataResolverRepository,
Expand All @@ -303,16 +302,16 @@ class MetadataResolverEnversVersioningTests extends Specification {
resolverHistory.size() == 2
getTargetEntityForRevisionIndex(resolverHistory, 1).name == 'rbmrUPDATED'
getTargetEntityForRevisionIndex(resolverHistory, 1).reloadableMetadataResolverAttributes.taskTimerRef == 'taskTimerRefUPDATED'
getTargetEntityForRevisionIndex(resolverHistory, 1).classpathMetadataResource.file == 'metadataUPDATED.xml'
getTargetEntityForRevisionIndex(resolverHistory, 1).classpathMetadataResource.fileResource == 'metadataUPDATED.xml'
getRevisionEntityForRevisionIndex(resolverHistory, 1).principalUserName == 'anonymousUser'
getRevisionEntityForRevisionIndex(resolverHistory, 1).timestamp > 0L
getModifiedEntityNames(resolverHistory, 1).sort() == expectedModifiedPersistentEntities.sort()

//Check the original revision is intact
getTargetEntityForRevisionIndex(resolverHistory, 0).name == 'rbmr'
getTargetEntityForRevisionIndex(resolverHistory, 0).reloadableMetadataResolverAttributes.taskTimerRef == 'taskTimerRef'
getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.file == 'metadata.xml'
getTargetEntityForRevisionIndex(resolverHistory, 0).classpathMetadataResource.fileResource == 'metadata.xml'
getRevisionEntityForRevisionIndex(resolverHistory, 0).principalUserName == 'anonymousUser'
getRevisionEntityForRevisionIndex(resolverHistory, 0).timestamp > 0L
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ class SeleniumSIDETest extends Specification {
'SHIBUI-1744: Verify attribute bundles in entity attribute filters' | '/SHIBUI-1744-3.side'
'SHIBUI-2052: Logged in user & role appear on dashboard' | '/SHIBUI-2052.side'
'SHIBUI-2116: Verify entity attribute bundle highlights' | '/SHIBUI-2116.side' // Note that this script WILL NOT PASS in the Selenium IDE due to ${driver} not being set (it is provided by this groovy script).

'SHIBUI-2269: Verify XML generation of external filters' | '/SHIBUI-2269.side'
}
}
2 changes: 1 addition & 1 deletion backend/src/integration/resources/SHIBUI-1281.side
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,7 @@
["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"],
["xpath=//div/div[5]/div/span", "xpath:position"]
],
"value": "True"
"value": "true"
}, {
"id": "1406d7e4-907d-4359-8de8-a40206f0993e",
"comment": "",
Expand Down
87 changes: 34 additions & 53 deletions backend/src/integration/resources/SHIBUI-1311.side
Original file line number Diff line number Diff line change
Expand Up @@ -461,42 +461,19 @@
"target": "500",
"targets": [],
"value": ""
}, {
"id": "232da257-962f-4a4b-8213-038ef90c96c3",
"comment": "",
"command": "click",
"target": "css=.btn-outline-secondary",
"targets": [
["css=.btn-outline-secondary", "css:finder"],
["xpath=(//button[@type='button'])[2]", "xpath:attributes"],
["xpath=//div[@id='/metadataFilters/RequiredValidUntil/maxValidityInterval-container']/div/div/button", "xpath:idRelative"],
["xpath=//div/button", "xpath:position"],
["xpath=//button[contains(.,'Toggle Dropdown')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "236d7114-a227-4087-8aa0-2851acfe19ac",
"comment": "",
"command": "pause",
"target": "500",
"targets": [],
"value": ""
}, {
"id": "b8d999f1-0c59-4a9a-9991-91d222f52b8e",
"comment": "",
"command": "click",
"target": "id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1",
"command": "type",
"target": "id=root_metadataFilters_0_maxValidityInterval",
"targets": [
["id=option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "id"],
["linkText=PT30S", "linkText"],
["css=#option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1", "css:finder"],
["xpath=//a[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval-item-1']", "xpath:attributes"],
["xpath=//div[@id='option-selector-items-root_metadataFilters_0_maxValidityInterval']/a[2]", "xpath:idRelative"],
["xpath=(//a[contains(@href, '#')])[2]", "xpath:href"],
["xpath=//div[2]/a[2]", "xpath:position"],
["xpath=//a[contains(.,'PT30S')]", "xpath:innerText"]
["id=root_metadataFilters_0_maxValidityInterval", "id"],
["css=#root_metadataFilters_0_maxValidityInterval", "css:finder"],
["xpath=//input[@id='root_metadataFilters_0_maxValidityInterval']", "xpath:attributes"],
["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[4]/div/div/div/div/div[2]/div/div/div/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": ""
"value": "PT1H"
}, {
"id": "8af1abb5-2c7a-4a4c-a8f7-0eb287100dde",
"comment": "",
Expand Down Expand Up @@ -1032,17 +1009,19 @@
"id": "b799fede-c85b-4bd3-8e03-347f8a7d188a",
"comment": "",
"command": "click",
"target": "css=tr:nth-child(2) .fa-chevron-circle-up",
"target": "css=tr:nth-child(2) .px-1:nth-child(3)",
"targets": [
["css=tr:nth-child(2) .fa-chevron-circle-up", "css:finder"],
["xpath=//tr[2]/td/div/button[2]/i", "xpath:position"]
["css=tr:nth-child(2) .px-1:nth-child(3)", "css:finder"],
["xpath=(//button[@type='button'])[9]", "xpath:attributes"],
["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div/div/table/tbody/tr[2]/td/div/button[2]", "xpath:idRelative"],
["xpath=//tr[2]/td/div/button[2]", "xpath:position"]
],
"value": ""
}, {
"id": "dc866249-3245-4baa-af0e-55af28d270cf",
"comment": "",
"command": "pause",
"target": "5000",
"target": "7000",
"targets": [],
"value": ""
}, {
Expand All @@ -1061,10 +1040,12 @@
"id": "664aafa3-9f6f-4eab-9eb6-a4d1a8344c5c",
"comment": "",
"command": "click",
"target": "css=tr:nth-child(2) .fa-chevron-circle-up",
"target": "css=tr:nth-child(2) .px-1:nth-child(3)",
"targets": [
["css=tr:nth-child(2) .fa-chevron-circle-up", "css:finder"],
["xpath=//tr[2]/td/div/button[2]/i", "xpath:position"]
["css=tr:nth-child(2) .px-1:nth-child(3)", "css:finder"],
["xpath=(//button[@type='button'])[9]", "xpath:attributes"],
["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div/div/table/tbody/tr[2]/td/div/button[2]", "xpath:idRelative"],
["xpath=//tr[2]/td/div/button[2]", "xpath:position"]
],
"value": ""
}, {
Expand All @@ -1079,21 +1060,21 @@
["xpath=//td[contains(.,'Disabled')]", "xpath:innerText"]
],
"value": ""
},{
"id": "4ec2c493-85e4-403b-9b09-031c5728f498",
"comment": "",
"command": "open",
"target": "/api/heheheheheheheWipeout",
"targets": [],
"value": ""
}, {
"id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4",
"comment": "",
"command": "assertText",
"target": "css=body",
"targets": [],
"value": "yes, you did it"
}]
}, {
"id": "4ec2c493-85e4-403b-9b09-031c5728f498",
"comment": "",
"command": "open",
"target": "/api/heheheheheheheWipeout",
"targets": [],
"value": ""
}, {
"id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4",
"comment": "",
"command": "assertText",
"target": "css=body",
"targets": [],
"value": "yes, you did it"
}]
}],
"suites": [{
"id": "894bbaf7-9978-4d30-b4e3-3c4263e084aa",
Expand Down
4 changes: 2 additions & 2 deletions backend/src/integration/resources/SHIBUI-1333.side
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@
["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"],
["xpath=//div/div[5]/div/span", "xpath:position"]
],
"value": "True"
"value": "true"
}, {
"id": "1406d7e4-907d-4359-8de8-a40206f0993e",
"comment": "",
Expand Down Expand Up @@ -2253,7 +2253,7 @@
["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:idRelative"],
["xpath=//section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:position"]
],
"value": "True"
"value": "true"
},{
"id": "4ec2c493-85e4-403b-9b09-031c5728f498",
"comment": "",
Expand Down
4 changes: 2 additions & 2 deletions backend/src/integration/resources/SHIBUI-1334-1.side
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@
["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"],
["xpath=//div/div[5]/div/span", "xpath:position"]
],
"value": "True"
"value": "true"
}, {
"id": "a1050ebe-55c5-4eac-8d12-615f3ff1cd72",
"comment": "",
Expand Down Expand Up @@ -2281,7 +2281,7 @@
["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:idRelative"],
["xpath=//section[8]/div/div[2]/object-property/array-property/div/div/div[3]/div/span", "xpath:position"]
],
"value": "True"
"value": "true"
}, {
"id": "2c46cdcd-d5a5-47fe-aa7b-0120fd2fcfc9",
"comment": "",
Expand Down
Loading

0 comments on commit 7fca767

Please sign in to comment.