Skip to content

Commit

Permalink
Fix acceptance environment + support gh passwords in resources (#122)
Browse files Browse the repository at this point in the history
* Enhancing github_release and cleanup script
  • Loading branch information
janosbinder authored and gberche-orange committed Jul 13, 2018
1 parent 87b0a5a commit 35dfecd
Show file tree
Hide file tree
Showing 14 changed files with 142 additions and 35 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ language: go
go:
- 1.9.x
go_import_path: github.com/terraform-providers/terraform-provider-cf
before_install:
- curl https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
- echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
- sudo apt-get update -q
- sudo apt-get install cf-cli -y
install:
- bash scripts/gogetcookie.sh
- go get github.com/kardianos/govendor
Expand Down Expand Up @@ -37,3 +42,5 @@ env:
- secure: mTBwHPjflXfIcZc2QVl6NalrEMXNru3lvfGKcitJqzYraFcUKcYadO+ltSwI7QnuTQWwHqw4cpLL3+YQ6OyxR+vhENP7Up4OAa06AJkTv1taoBuOaeDxHuqmoyRhIcv7Ab6+gt67+fFzxxK6i8rSVTB+Q7ya0F3Hqp5X17SdlkTDc0Yu3j0NC6VzyO1dvuUDOKBXICzPl5Nrs4dHmdP7nizpScJ2GQV7AdTVaLeEweiDXBa2OXScQH1jNUBU/zm+FeClOpi6ydRwkrlVyF65Y98jzuyZKrq8ewPrayMv+4yd0JkEkIm5pv3Gk/zJf2/rjcQf4zQ4Cr2EXYcZFDFecDJwdXE8aosX3sxNY2fxThh8UrgKso4zDaiiRIbRl/GZfcgDb7k5neAKj2J+drrfrz6v0jDPAoIID/YbK2jNlq375v1V3ZaqFlMNhGBRlYJ4v3B8W2awm5YXKsT4L3JF6Au7PriUIhmEvSXch/5jmStc06a8Xy+K+bu1xadxEzMluHWi2cuOPiJ3NDm8rfQW0A7KrPI8KQnQOPzgvl1yxuhENulagcc1RBoHcZLo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rnYw9AWT7U=
- secure: hjoC37QHe+TkafbLm0HR7uz75hHhGRGP8C7PGO0d6jmops26vMdWw3OxjpYgxGJ4vXNTZ3FkGuaq2Gs744xwD/P9ItB424crXN7/7VL5Yw/u/Y4jPwsr8ZhSERRQI87JOzFx3kX92dsAoxwoRz8FPxmFeLgz/FtNftBjcZKXAtOWkOjPu+p3/g9rVEL9nbjsUpJiKTokKay3IOpSFyKoJAx8CSrHX5npInZdM/Rz3+INkk0Fj48hr4ghlWNpsoxnHlrtOLSiEuKJZ3Nhl5MQSQxwHSRBWMP2TdWn11iqoYeilBab0s6P7Fse/w0lKYcFTseDZVq5QqGBs1JPHvQqz2RxJviDOHKHFxf1K/VxS50jb9cFmWl/1SI4nbxmpGL8Pr5hQw15TScwo4RIa2DC94JiMlPOcWxyPXu6FwZoexg99/14tb2681oa8Jk3rVNQtZuhBa4hOaXA/QrWTZMcfbGeRPMp5xVmoCRVpT644eD7fZpBol8CeFHaNj6jz8Vvk29UoAjnrT3RcNtP8ykUtoKP1g0fpyZvJzprXSOntDyLEa4+qfuU3kCi+0O/Zs2RfuxEFbyq8/R+T80cZ2e1PaSpggDSvjSW5nK2h9soph0xqGuuRbW4wcA+g9x9pEoJJBlJqgXMbPvqEFgfAqTFqNK3+8nqJaC4sOoHPUInOKE=
4 changes: 3 additions & 1 deletion cloudfoundry/import_cf_buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package cloudfoundry
import (
"testing"

"fmt"
"github.com/hashicorp/terraform/helper/resource"
"os"
)

func TestAccBuildpack_importBasic(t *testing.T) {
Expand All @@ -17,7 +19,7 @@ func TestAccBuildpack_importBasic(t *testing.T) {
Steps: []resource.TestStep{

resource.TestStep{
Config: buildpackResource,
Config: fmt.Sprintf(buildpackResource, os.Getenv("GITHUB_USER"), os.Getenv("GITHUB_TOKEN")),
},

resource.TestStep{
Expand Down
8 changes: 6 additions & 2 deletions cloudfoundry/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ func testAccEnvironmentSet() bool {
uaaClientID := os.Getenv("CF_UAA_CLIENT_ID")
uaaClientSecret := os.Getenv("CF_UAA_CLIENT_SECRET")
skipSslValidation := strings.ToLower(os.Getenv("CF_SKIP_SSL_VALIDATION"))
githubUser := os.Getenv("GITHUB_USER")
githubPassword := os.Getenv("GITHUB_TOKEN")

if len(endpoint) == 0 ||
len(user) == 0 ||
len(password) == 0 ||
len(uaaClientID) == 0 ||
len(uaaClientSecret) == 0 ||
len(skipSslValidation) == 0 {
len(skipSslValidation) == 0 ||
len(githubUser) == 0 ||
len(githubPassword) == 0 {

fmt.Println("CF_API_URL, CF_USER, CF_PASSWORD, CF_UAA_CLIENT_ID, CF_UAA_CLIENT_SECRET " +
"and CF_SKIP_SSL_VALIDATION must be set for acceptance tests to work.")
"CF_SKIP_SSL_VALIDATION, GITHUB_USER and GITHUB_TOKEN must be set for acceptance tests to work.")
return false
}
return true
Expand Down
15 changes: 12 additions & 3 deletions cloudfoundry/repo/github_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func testReleaseFileDownload(workspace string, t *testing.T) {
fmt.Println("Test: release file download")

repoManager := repo.NewManager(workspace)
ghRelease, err := repoManager.GetGithubRelease("mevansam", "test-app", "test_release_file.zip", nil)
testUser := os.Getenv("GITHUB_USER")
testPassword := os.Getenv("GITHUB_TOKEN")
ghRelease, err := repoManager.GetGithubRelease("mevansam", "test-app", "test_release_file.zip", &testUser, &testPassword)
checkError(t, err)

err = ghRelease.SetVersion("v0.0.1", repo.DefaultVersionType)
Expand All @@ -51,7 +53,10 @@ func testSourceZipFileDownload(workspace string, t *testing.T) {
fmt.Println("Test: source zip file download")

repoManager := repo.NewManager(workspace)
ghRelease, err := repoManager.GetGithubRelease("mevansam", "test-app", "zipball", nil)
testUser := os.Getenv("GITHUB_USER")
testPassword := os.Getenv("GITHUB_TOKEN")
ghRelease, err := repoManager.GetGithubRelease("mevansam", "test-app", "zipball", &testUser, &testPassword)

checkError(t, err)

err = ghRelease.SetVersion("v0.0.1", repo.DefaultVersionType)
Expand All @@ -64,7 +69,10 @@ func testSourceTarFileDownload(workspace string, t *testing.T) {
fmt.Println("Test: source tar file download")

repoManager := repo.NewManager(workspace)
ghRelease, err := repoManager.GetGithubRelease("mevansam", "test-app", "tarball", nil)
testUser := os.Getenv("GITHUB_USER")
testPassword := os.Getenv("GITHUB_TOKEN")
ghRelease, err := repoManager.GetGithubRelease("mevansam", "test-app", "tarball", &testUser, &testPassword)

checkError(t, err)

err = ghRelease.SetVersion("v0.0.1", repo.DefaultVersionType)
Expand Down Expand Up @@ -109,6 +117,7 @@ func validateSourceZip(path string, t *testing.T) {
checkError(t, err)

for _, f := range r.File {

if f.Name == "README.md" {
rc, err := f.Open()
checkError(t, err)
Expand Down
19 changes: 8 additions & 11 deletions cloudfoundry/repo/repo_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import (
"sync"

"github.com/google/go-github/github"
"golang.org/x/oauth2"

git "gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/transport"
"gopkg.in/src-d/go-git.v4/plumbing/transport/ssh"
Expand Down Expand Up @@ -119,19 +117,18 @@ func (rm *Manager) GetGitRepository(repoURL string, user, password, privateKey *
}

// GetGithubRelease -
func (rm *Manager) GetGithubRelease(ghOwner, ghRepoName, archiveName string, token *string) (repo Repository, err error) {

func (rm *Manager) GetGithubRelease(ghOwner, ghRepoName, archiveName string, user *string, password *string) (repo Repository, err error) {
var ghClient *github.Client
ctx := context.Background()

if token == nil {
if user == nil || password == nil {
ghClient = github.NewClient(nil)
} else {
ts := oauth2.StaticTokenSource(
&oauth2.Token{AccessToken: *token},
)
tc := oauth2.NewClient(ctx, ts)
ghClient = github.NewClient(tc)
tp := github.BasicAuthTransport{
Username: *user,
Password: *password,
}
ghClient = github.NewClient(tp.Client())
}

if _, _, err = ghClient.Repositories.Get(ctx, ghOwner, ghRepoName); err != nil {
Expand Down
6 changes: 5 additions & 1 deletion cloudfoundry/resource_cf_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ func resourceApp() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
"token": &schema.Schema{
"user": &schema.Schema{
Type: schema.TypeString,
Optional: true,
},
"password": &schema.Schema{
Type: schema.TypeString,
Optional: true,
},
Expand Down
5 changes: 4 additions & 1 deletion cloudfoundry/resource_cf_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/terraform-providers/terraform-provider-cf/cloudfoundry/cfapi"
"os"
)

const appResourceSpringMusic = `
Expand Down Expand Up @@ -169,6 +170,8 @@ resource "cloudfoundry_app" "test-app" {
repo = "test-app"
filename = "test-app"
version = "v0.0.1"
user = "%s"
password = "%s"
}
}
resource "cloudfoundry_route" "test-app-8888" {
Expand Down Expand Up @@ -430,7 +433,7 @@ func TestAccApp_app2(t *testing.T) {
Steps: []resource.TestStep{

resource.TestStep{
Config: fmt.Sprintf(appResourceWithMultiplePorts, defaultAppDomain()),
Config: fmt.Sprintf(appResourceWithMultiplePorts, defaultAppDomain(), os.Getenv("GITHUB_USER"), os.Getenv("GITHUB_TOKEN")),
Check: resource.ComposeTestCheckFunc(
testAccCheckAppExists(refApp, func() (err error) {
responses := []string{"8888"}
Expand Down
6 changes: 5 additions & 1 deletion cloudfoundry/resource_cf_buildpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ func resourceBuildpack() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
"token": &schema.Schema{
"user": &schema.Schema{
Type: schema.TypeString,
Optional: true,
},
"password": &schema.Schema{
Type: schema.TypeString,
Optional: true,
},
Expand Down
9 changes: 7 additions & 2 deletions cloudfoundry/resource_cf_buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/terraform-providers/terraform-provider-cf/cloudfoundry/cfapi"
"os"
)

const buildpackResource = `
Expand All @@ -26,6 +27,8 @@ resource "cloudfoundry_buildpack" "tomee" {
repo = "tomee-buildpack"
version = "${var.tomee_buildpack_ver}"
filename = "tomee-buildpack-v4.1.zip"
user = "%s"
password = "%s"
}
}
`
Expand All @@ -48,6 +51,8 @@ resource "cloudfoundry_buildpack" "tomee" {
repo = "tomee-buildpack"
version = "${var.tomee_buildpack_ver}"
filename = "tomee-buildpack-v4.1.zip"
user = "%s"
password = "%s"
}
}
`
Expand Down Expand Up @@ -79,7 +84,7 @@ func TestAccBuildpack_normal(t *testing.T) {
Steps: []resource.TestStep{

resource.TestStep{
Config: buildpackResource,
Config: fmt.Sprintf(buildpackResource, os.Getenv("GITHUB_USER"), os.Getenv("GITHUB_TOKEN")),
Check: resource.ComposeTestCheckFunc(
testAccCheckBuildpackExists(refBuildpack, "tomee-buildpack-v4.1.zip"),
resource.TestCheckResourceAttr(
Expand All @@ -94,7 +99,7 @@ func TestAccBuildpack_normal(t *testing.T) {
},

resource.TestStep{
Config: buildpackResourceUpdate1,
Config: fmt.Sprintf(buildpackResourceUpdate1, os.Getenv("GITHUB_USER"), os.Getenv("GITHUB_TOKEN")),
Check: resource.ComposeTestCheckFunc(
testAccCheckBuildpackExists(refBuildpack, "tomee-buildpack-v4.1.zip"),
resource.TestCheckResourceAttr(
Expand Down
13 changes: 9 additions & 4 deletions cloudfoundry/utils_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func getRepositoryFromConfig(d *schema.ResourceData) (repository repo.Repository

var (
arg, ghOwner, ghRepo, archiveName string
token *string
user, password *string
)

ghOwner = githubArgs["owner"].(string)
Expand All @@ -94,13 +94,18 @@ func getRepositoryFromConfig(d *schema.ResourceData) (repository repo.Repository
version = githubArgs["version"].(string)
versionType = repo.DefaultVersionType

if arg = githubArgs["token"].(string); len(arg) > 0 {
token = &arg
if arg = githubArgs["user"].(string); len(arg) > 0 {
user = &arg
}

if repository, err = repoManager.GetGithubRelease(ghOwner, ghRepo, archiveName, token); err != nil {
if arg = githubArgs["password"].(string); len(arg) > 0 {
password = &arg
}

if repository, err = repoManager.GetGithubRelease(ghOwner, ghRepo, archiveName, user, password); err != nil {
return repository, err
}

}
if err = repository.SetVersion(version, versionType); err != nil {
return repository, err
Expand Down
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if [[ "$TRAVIS_PULL_REQUEST" == "false" && -z "$TRAVIS_TAG" ]] ; then
exit 0
fi

tests/clean.sh
make testacc
make release

78 changes: 71 additions & 7 deletions tests/clean.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,86 @@
#!/bin/bash

cf target -o pcfdev-org -s pcfdev-space
echo "Start cleaning up potentially leaking resources from previous test executions. Warnings about missing resources should be ignored"

CF_SPACE=pcfdev-space
CF_ORG=pcfdev-org

set -e # Exit if the login fails (not set or wrongly set!)
cf api $CF_API_URL --skip-ssl-validation
cf login -u $CF_USER -p $CF_PASSWORD -o $CF_ORG -s $CF_SPACE
set +e

# Please add any further resources do not get destroyed

# Delete apps

cf unbind-route-service -f local.pcfdev.io basic-auth --hostname php-app
cf delete-service -f basic-auth
cf delete -f php-app
cf delete -f basic-auth-router
cf delete -f basic-auth-broker
cf delete-route -f local.pcfdev.io --hostname php-app
cf delete-route -f local.pcfdev.io --hostname php-app-other
cf delete-route -f local.pcfdev.io --hostname basic-auth-router
cf delete-route -f local.pcfdev.io --hostname basic-auth-broker
cf delete -f test-app
cf delete -f test-docker-app

# Delete org and security gorups

cf delete-org -f organization-one
cf delete-org -f myorg
cf delete-security-group -f app-services1
cf delete-security-group -f app-services2
cf delete-security-group -f app-services3
cf delete-security-group -f app-services

# Delete services and service instances

cf delete-service -f basic-auth
cf delete-service -f rabbitmq
cf purge-service-offering -f p-basic-auth
cf delete-service-broker -f basic-auth

# Delete routes

cf delete-route -f $CF_TEST_APP_DOMAIN --hostname php-app
cf delete-route -f $CF_TEST_APP_DOMAIN --hostname php-app-other
cf delete-route -f $CF_TEST_APP_DOMAIN --hostname basic-auth-router
cf delete-route -f $CF_TEST_APP_DOMAIN --hostname basic-auth-broker
cf delete-route -f $CF_TEST_APP_DOMAIN --hostname test-app
cf delete-route -f $CF_TEST_APP_DOMAIN --hostname test-docker-app
cf unbind-route-service -f $CF_TEST_APP_DOMAIN basic-auth --hostname php-app

# Delete users

cf delete-user manager1@acme.com -f
cf delete-user auditor@acme.com -f
cf delete-user teamlead@acme.com -f
cf delete-user developer1@acme.com -f
cf delete-user developer2@acme.com -f
cf delete-user developer3@acme.com -f
cf delete-user cf-admin -f

# url=$(cf curl /v2/service_brokers | jq -r '.resources[] | select(.entity.name | contains("basic-auth")) | .metadata.url')
# if [ ! -z "${url}" ]; then
# echo deleting ${url}
# cf curl -X DELETE ${url}
# fi

# Sanity checks

CF_SPACE_GUID=`cf space --guid $CF_SPACE`
CF_ORG_GUID=`cf org --guid $CF_ORG`

if [ `cf curl "/v2/apps?q=space_guid:$CF_SPACE_GUID" | jq ".total_results"` -ne "0" ]; then
echo "ERROR: The acceptance environment contains some residual apps, run \"cf a\" - please clean them up";
exit 1;
fi

if [ `cf curl "/v2/routes?q=organization_guid:$CF_ORG_GUID" | jq ".total_results"` -ne "0" ]; then
echo "ERROR: The acceptance environment contains some residual routes, run \"cf routes\" - please clean them up";
exit 1;
fi

if [ `cf curl "/v2/service_instances?q=organization_guid:$CF_ORG_GUID" | jq ".total_results"` -ne "0" ]; then
echo "ERROR: The acceptance environment contains some residual service instances, run \"cf s\" - please clean them up";
exit 1;
fi

echo "Completed cleaning up potentially leaking resources from previous test executions."
exit 0
3 changes: 2 additions & 1 deletion website/docs/r/app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ One of the following arguments must be declared to locate application source or

- `owner` - (Required, String) The github owner or organization name
- `repo` - (Required, String) The repository containing the release
- `token` - (Optional, String) Github API token to use to access Github
- `user` - (Optional, String) Github user to use to access Github
- `password` - (Optional, String) Github password/personal token to use to access Github
- `version` - (Optional, String) The version or tag of the release.
- `filename` - (Required, String) The name of the published file. The values `zipball` or `tarball` will download the published

Expand Down
3 changes: 2 additions & 1 deletion website/docs/r/buildpack.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ One of the following arguments must be declared to locate buildpack source or ar
* `github_release` - (Optional, String) The Buildpack archive published as a github release.
- `owner` - (Required, String) The github owner or organization name.
- `repo` - (Required, String) The repository containing the release.
- `token` - (Optional, String) Github API token to use to access Github.
- `user` - (Optional, String) Github user to use to access Github.
- `password` - (Optional, String) Github password/personal token to use to access Github.
- `version` - (Optional, String) The version or tag of the release.
- `filename` - (Required, String) The name of the published file. The values `zipball` or `tarball` will download the published source archive.

Expand Down

0 comments on commit 35dfecd

Please sign in to comment.