Merge pull request #173 from maheshkelkar/issues/166-add-ldap-to-all-ymls
Add ldap config to all deploydb config files used in cucumber tests
This commit is contained in:
commit
077e6f1d6d
|
@ -22,4 +22,19 @@ logging:
|
|||
currentLogFilename: ./logs/deploydb-cucumber.log
|
||||
threshold: ALL
|
||||
archive: false
|
||||
timeZone: UTC
|
||||
timeZone: UTC
|
||||
|
||||
ldap:
|
||||
uri: ldap://localhost:10389
|
||||
cachePolicy: maximumSize=10000, expireAfterWrite=10m
|
||||
baseDC: "dc=example,dc=com"
|
||||
bindDN: "cn=admin"
|
||||
bindPassword: "secret"
|
||||
userNamePrefix: cn
|
||||
userObjectClass: posixUser
|
||||
groupNamePrefix: cn
|
||||
groupMembershipPrefix: memberUid
|
||||
groupObjectClass: posixGroup
|
||||
distinguishedNamePrefix: entryDN
|
||||
connectTimeout: 500ms
|
||||
readTimeout: 500ms
|
|
@ -27,4 +27,19 @@ logging:
|
|||
currentLogFilename: ./logs/deploydb-cucumber.log
|
||||
threshold: ALL
|
||||
archive: false
|
||||
timeZone: UTC
|
||||
timeZone: UTC
|
||||
|
||||
ldap:
|
||||
uri: ldap://localhost:10389
|
||||
cachePolicy: maximumSize=10000, expireAfterWrite=10m
|
||||
baseDC: "dc=example,dc=com"
|
||||
bindDN: "cn=admin"
|
||||
bindPassword: "secret"
|
||||
userNamePrefix: cn
|
||||
userObjectClass: posixUser
|
||||
groupNamePrefix: cn
|
||||
groupMembershipPrefix: memberUid
|
||||
groupObjectClass: posixGroup
|
||||
distinguishedNamePrefix: entryDN
|
||||
connectTimeout: 500ms
|
||||
readTimeout: 500ms
|
|
@ -30,15 +30,23 @@ Feature: Promotion Result APIs
|
|||
"""
|
||||
|
||||
|
||||
@freezetime @wip
|
||||
Scenario: (issue 166) Adding a result for a Manual LDAP Promotion associated with a Deployment succeeds
|
||||
@freezetime
|
||||
Scenario: Adding a result for a Manual LDAP Promotion associated with a Deployment
|
||||
succeeds only if user belongs to the configured group
|
||||
|
||||
Given a manual LDAP promotion is configured
|
||||
And there is a deployment with manual LDAP promotion
|
||||
Given a promotion configuration name "manualPromo":
|
||||
"""
|
||||
type: deploydb.models.promotion.ManualLDAPPromotionImpl
|
||||
description: "Manual LDAP Promotion"
|
||||
attributes:
|
||||
allowedGroup: fox
|
||||
|
||||
"""
|
||||
And there is a deployment with "manualPromo" promotion
|
||||
When I POST to "/api/deployments/1/promotions" with credentials "peter:griffin" and:
|
||||
"""
|
||||
{
|
||||
"name" : "manual-promotion",
|
||||
"name" : "manualPromo",
|
||||
"status" : "SUCCESS"
|
||||
}
|
||||
"""
|
||||
|
@ -47,7 +55,7 @@ Feature: Promotion Result APIs
|
|||
"""
|
||||
{
|
||||
"id" : 1,
|
||||
"promotion" : "manual-promotion",
|
||||
"promotion" : "manualPromo",
|
||||
"status" : "SUCCESS",
|
||||
"infoUrl" : null,
|
||||
"createdAt" : "{{created_timestamp}}"
|
||||
|
|
|
@ -53,14 +53,6 @@ class ModelHelper {
|
|||
'jenkins-smoke for Fun as a Service')
|
||||
}
|
||||
|
||||
Promotion sampleManualLDAPPromotion() {
|
||||
Promotion promotion = new Promotion("manual-promotion",
|
||||
"deploydb.models.promotion.ManualLDAPPromotionImpl",
|
||||
"Manual Promotion smoke test")
|
||||
promotion.attributes = ["allowedGroup":"fox"]
|
||||
return promotion
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a sample environment object
|
||||
*/
|
||||
|
|
|
@ -178,7 +178,7 @@ And(~/the first deployments is in "(.*?)" state$/) { String deploymentState ->
|
|||
}
|
||||
}
|
||||
|
||||
Given(~/^there is a deployment with manual LDAP promotion$/) { ->
|
||||
Given(~/^there is a deployment with "(.*?)" promotion$/) { String promotionIdent ->
|
||||
withSession {
|
||||
|
||||
/**
|
||||
|
@ -191,7 +191,7 @@ Given(~/^there is a deployment with manual LDAP promotion$/) { ->
|
|||
/**
|
||||
* Create sample promotion & promotionResult(s)
|
||||
*/
|
||||
PromotionResult p1 = new PromotionResult("manual-promotion", Status.STARTED, null)
|
||||
PromotionResult p1 = new PromotionResult(promotionIdent, Status.STARTED, null)
|
||||
|
||||
/**
|
||||
* Create deployment
|
||||
|
|
|
@ -29,11 +29,3 @@ Given(~/^promotions are configured$/) { ->
|
|||
promotionRegistry.put(b.ident, b)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Given(~/^a manual LDAP promotion is configured$/) { ->
|
||||
withPromotionRegistry { ModelRegistry<Promotion> promotionRegistry ->
|
||||
Promotion a = sampleManualLDAPPromotion()
|
||||
promotionRegistry.put(a.ident, a)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue