Skip to content

Commit

Permalink
Merge pull request #122 from mxmorin/master
Browse files Browse the repository at this point in the history
add ldap_search_password creation
  • Loading branch information
wrighbr authored Apr 30, 2021
2 parents 64ac5c3 + ea03a5e commit 329e8db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func GetConfigAuth(d *schema.ResourceData) models.ConfigBodyPost {
AuthMode: "ldap_auth",
LdapURL: d.Get("ldap_url").(string),
LdapSearchDn: d.Get("ldap_search_dn").(string),
LdapSearchPassword: d.Get("ldap_search_password").(string),
LdapBaseDn: d.Get("ldap_base_dn").(string),
LdapFilter: d.Get("ldap_filter").(string),
LdapUID: d.Get("ldap_uid").(string),
Expand Down
1 change: 1 addition & 0 deletions models/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type ConfigBodyPost struct {
LdapGroupBaseDn string `json:"ldap_group_base_dn,omitempty"`
LdapGroupAttributeName string `json:"ldap_group_attribute_name,omitempty"`
LdapGroupMembershipAttribute string `json:"ldap_group_membership_attribute,omitempty"`
LdapSearchPassword string `json:"ldap_search_password,omitempty"`
EmailInsecure bool `json:"email_insecure"`
LdapGroupAdminDn string `json:"ldap_group_admin_dn,omitempty"`
EmailUsername string `json:"email_username,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion provider/resource_config_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func resourceConfigAuth() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ConflictsWith: ldapConflictsWith(),
RequiredWith: ldapRequiredWith(),
RequiredWith: ldapRequiredWith(),
},
"ldap_uid": {
Type: schema.TypeString,
Expand Down
8 changes: 4 additions & 4 deletions provider/resource_garbage_collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ func TestAccGCUpdate(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckResourceExists(harborGCMain),
resource.TestCheckResourceAttr(
harborGCMain, "schedule", "daily"),
harborGCMain, "schedule", "Daily"),
),
},
{
Config: testAccCheckGCUpdate(),
Check: resource.ComposeTestCheckFunc(
testAccCheckResourceExists(harborGCMain),
resource.TestCheckResourceAttr(
harborGCMain, "schedule", "hourly"),
harborGCMain, "schedule", "Hourly"),
resource.TestCheckResourceAttr(
harborGCMain, "delete_untagged", "true"),
),
Expand All @@ -65,15 +65,15 @@ func TestAccGCUpdate(t *testing.T) {
func testAccCheckGCBasic() string {
return fmt.Sprintf(`
resource "harbor_garbage_collection" "main" {
schedule = "daily"
schedule = "Daily"
}
`)
}

func testAccCheckGCUpdate() string {
return fmt.Sprintf(`
resource "harbor_garbage_collection" "main" {
schedule = "hourly"
schedule = "Hourly"
delete_untagged = true
}
`)
Expand Down

0 comments on commit 329e8db

Please sign in to comment.