Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab_project_push_rules resource #163

Merged
merged 18 commits into from Oct 17, 2019

Conversation

six-arm
Copy link
Contributor

@six-arm six-arm commented Jul 21, 2019

New resource for project push rules (EE only). I've tested against EE and CE. Tests are automatically skipped on CE. Unfortunately, you need a license for EE to see the test results.

Bellow is acceptance test results against licensed EE. Note, slack and jira resource test failures are pre-existing. I'll submit fix/file issues separately. When run against CE all tests pass (push rules tests are skipped).

13:06 $ make testacc
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v  -timeout 120m
?       github.com/terraform-providers/terraform-provider-gitlab        [no test files]
=== RUN   TestAccDataSourceGitlabGroup_basic
--- PASS: TestAccDataSourceGitlabGroup_basic (11.54s)
=== RUN   TestAccDataGitlabProject_basic
--- PASS: TestAccDataGitlabProject_basic (6.16s)
=== RUN   TestAccDataSourceGitlabUser_basic
--- PASS: TestAccDataSourceGitlabUser_basic (1.47s)
=== RUN   TestAccDataSourceGitlabUsers_basic
--- PASS: TestAccDataSourceGitlabUsers_basic (1.51s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccGitlabBranchProtection_basic
--- PASS: TestAccGitlabBranchProtection_basic (7.58s)
=== RUN   TestAccGitlabDeployKey_basic
--- PASS: TestAccGitlabDeployKey_basic (7.80s)
=== RUN   TestAccGitlabDeployKey_suppressfunc
--- PASS: TestAccGitlabDeployKey_suppressfunc (6.11s)
=== RUN   TestAccGitlabDeployKey_import
--- PASS: TestAccGitlabDeployKey_import (6.20s)
=== RUN   TestAccGitlabGroupMembership_basic
--- PASS: TestAccGitlabGroupMembership_basic (7.17s)
=== RUN   TestAccGitlabGroup_basic
--- PASS: TestAccGitlabGroup_basic (6.74s)
=== RUN   TestAccGitlabGroup_import
--- PASS: TestAccGitlabGroup_import (5.68s)
=== RUN   TestAccGitlabGroup_nested
--- PASS: TestAccGitlabGroup_nested (28.32s)
=== RUN   TestAccGitlabGroupVariable_basic
--- PASS: TestAccGitlabGroupVariable_basic (6.78s)
=== RUN   TestAccGitlabLabel_basic
--- PASS: TestAccGitlabLabel_basic (8.28s)
=== RUN   TestAccGitlabPipelineSchedule_basic
--- PASS: TestAccGitlabPipelineSchedule_basic (7.50s)
=== RUN   TestAccGitlabPipelineTrigger_basic
--- PASS: TestAccGitlabPipelineTrigger_basic (7.63s)
=== RUN   TestAccGitlabProjectCluster_basic
--- PASS: TestAccGitlabProjectCluster_basic (9.12s)
=== RUN   TestAccGitlabProjectCluster_import
--- PASS: TestAccGitlabProjectCluster_import (6.39s)
=== RUN   TestAccGitlabProjectHook_basic
--- PASS: TestAccGitlabProjectHook_basic (7.22s)
=== RUN   TestAccGitlabProjectMembership_basic
--- PASS: TestAccGitlabProjectMembership_basic (8.02s)
=== RUN   TestAccGitlabProjectPushRules_basic
--- PASS: TestAccGitlabProjectPushRules_basic (7.38s)
=== RUN   TestAccGitlabProject_basic
--- PASS: TestAccGitlabProject_basic (15.54s)
=== RUN   TestAccGitlabProject_willError
--- PASS: TestAccGitlabProject_willError (6.68s)
=== RUN   TestAccGitlabProject_import
--- PASS: TestAccGitlabProject_import (6.06s)
=== RUN   TestAccGitlabProject_nestedImport
--- PASS: TestAccGitlabProject_nestedImport (11.45s)
=== RUN   TestAccGitlabProjectVariable_basic
--- PASS: TestAccGitlabProjectVariable_basic (7.29s)
=== RUN   TestAccGitlabServiceJira_basic
--- PASS: TestAccGitlabServiceJira_basic (0.05s)
=== RUN   TestAccGitlabServiceJira_import
--- PASS: TestAccGitlabServiceJira_import (0.04s)
=== RUN   TestAccGitlabServiceSlack_basic
--- FAIL: TestAccGitlabServiceSlack_basic (5.78s)
    testing.go:568: Step 0 error: errors during apply:
        
        Error: PUT http://localhost:8080/api/v4/projects/70/services/slack: 400 {message: 400 Bad Request}
        
          on /var/folders/vn/9g_m2_8d07v1z_f1rvxbzy9h0000gn/T/tf-test845758802/main.tf line 11:
          (source code not available)
        
        
=== RUN   TestAccGitlabServiceSlack_import
--- FAIL: TestAccGitlabServiceSlack_import (5.73s)
    testing.go:568: Step 0 error: errors during apply:
        
        Error: PUT http://localhost:8080/api/v4/projects/71/services/slack: 400 {message: 400 Bad Request}
        
          on /var/folders/vn/9g_m2_8d07v1z_f1rvxbzy9h0000gn/T/tf-test872225364/main.tf line 11:
          (source code not available)
        
        
=== RUN   TestAccGitlabTagProtection_basic
--- PASS: TestAccGitlabTagProtection_basic (7.58s)
=== RUN   TestAccGitlabTagProtection_wildcard
--- PASS: TestAccGitlabTagProtection_wildcard (7.34s)
=== RUN   TestAccGitlabUser_basic
--- PASS: TestAccGitlabUser_basic (1.44s)
=== RUN   TestGitlab_validation
--- PASS: TestGitlab_validation (0.00s)
=== RUN   TestGitlab_visbilityHelpers
--- PASS: TestGitlab_visbilityHelpers (0.00s)
=== RUN   TestValidateURLFunc
--- PASS: TestValidateURLFunc (0.00s)
FAIL
FAIL    github.com/terraform-providers/terraform-provider-gitlab/gitlab 239.616s
make: *** [testacc] Error 1

@six-arm six-arm mentioned this pull request Jul 21, 2019
@smedefind
Copy link

Any forward movement on this? We'd love to have this feature.

My rats nest of curl commands isn't as pleasant as Terraform would be.

@roidelapluie
Copy link
Collaborator

Please fix conflicts

@six-arm
Copy link
Contributor Author

six-arm commented Oct 2, 2019

Ready when you are @roidelapluie

@roidelapluie
Copy link
Collaborator

Yes I will take care of that ASAP

@roidelapluie
Copy link
Collaborator

tests are running

@roidelapluie roidelapluie merged commit c5a9a29 into gitlabhq:master Oct 17, 2019
@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.
3 participants