Skip to content

Conversation

@chriswgerber
Copy link
Contributor

Uses the *gitlab.Project struct and resource Schema to test the resulting values.

Removes the extra generate access token file and updates the access token value to be generated from a variable (with a default).

Uses the *gitlab.Project struct and resource Schema to test the
resulting values.

removes the extra generate access token file and updates the access
token value to be generated from a variable (with a default).
@ghost ghost added the size/XL label May 9, 2019
Copy link
Collaborator

@roidelapluie roidelapluie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your high quality contribution!

Just a few remarks; but I could merge it directly.

echo "Starting gitlab container..."
docker run -d -e GITLAB_ROOT_PASSWORD=adminadmin --rm -p 127.0.0.1:8080:80 --name gitlab gitlab/gitlab-ce
docker run -d --rm --name gitlab \
-e GITLAB_ROOT_PASSWORD=adminadmin \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want this as a variable as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could potentially be. For the sake of automated tests it's not even necessary to set the root password since we're not even accessing the UI, but it might be useful if someone wasn't deleting the test resources and was trying to log in afterwards to view them.

Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
"no one", "guest", "reporter", "developer", "maintainer"}, false),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a slice in the gitlab library for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values are stored in the library as type gitlab.AccessLevelValue. Would need a method to convert them to type gitlab.AccessLevelValue and then another to check value against the type.

"visibility_level": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"private", "internal", "public"}, true),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a slice in the gitlab library for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values are stored in the library as type gitlab.VisibilityValue. Would need a method to convert them to type gitlab.VisibilityValue and then another to check value against the type.

"merge_method": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"merge", "rebase_merge", "ff"}, true),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a slice in the gitlab library for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values are stored in the library as type gitlab.MergeMethodValue. Would need a method to convert them to type gitlab.MergeMethodValue and then another possibly to check value against the type.

@roidelapluie roidelapluie merged commit c95dfb0 into gitlabhq:master May 9, 2019
@roidelapluie
Copy link
Collaborator

Thanks

@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

2 participants