forked from claranet/terraform-provider-clouddeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TER-235: Fix typo in readme, example and app test file
- Loading branch information
Jordan Caussat
committed
Mar 20, 2018
1 parent
80695ac
commit fcd5697
Showing
3 changed files
with
4 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,16 +25,6 @@ func TestAccGhostAppBasic(t *testing.T) { | |
testAccCheckGhostAppExists(resourceName), | ||
resource.TestCheckResourceAttr(resourceName, "name", envName), | ||
resource.TestCheckResourceAttr(resourceName, "env", "dev"), | ||
resource.TestCheckResourceAttr(resourceName, "region", "eu-west-1"), | ||
), | ||
}, | ||
{ | ||
Config: testAccGhostAppConfigUpdated(envName), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
testAccCheckGhostAppExists(resourceName), | ||
resource.TestCheckResourceAttr(resourceName, "name", envName), | ||
resource.TestCheckResourceAttr(resourceName, "env", "dev"), | ||
resource.TestCheckResourceAttr(resourceName, "region", "eu-west-2"), | ||
), | ||
}, | ||
}, | ||
|
@@ -68,7 +58,7 @@ func testAccGhostAppConfig(name string) string { | |
resource "ghost_app" "test" { | ||
name = "%s" | ||
env = "dev" | ||
role = "web-front_" | ||
role = "webfront" | ||
region = "eu-west-1" | ||
instance_type = "t2.micro" | ||
|
@@ -125,7 +115,7 @@ func testAccGhostAppConfig(name string) string { | |
name = "wordpress2" | ||
pre_deploy = "ZXhpdCAx" | ||
post_deploy = "ZXhpdCAx" | ||
path = "/var/www-test.test_ew" | ||
path = "/var/www-test.test" | ||
scope = "code" | ||
git_repo = "https://github.com/KnpLabs/KnpIpsum.git" | ||
}] | ||
|
@@ -151,179 +141,3 @@ func testAccGhostAppConfig(name string) string { | |
} | ||
`, name) | ||
} | ||
|
||
func testAccGhostAppConfigUpdated(name string) string { | ||
return fmt.Sprintf(` | ||
resource "ghost_app" "test" { | ||
name = "%s" | ||
env = "dev" | ||
role = "webfront" | ||
region = "eu-west-2" | ||
instance_type = "t2.micro" | ||
vpc_id = "vpc-3f1eb65a" | ||
log_notifications = [ | ||
"[email protected]", | ||
] | ||
build_infos = { | ||
subnet_id = "subnet-a7e849fe" | ||
ssh_username = "admin" | ||
source_ami = "ami-03ce4474" | ||
} | ||
environment_infos = { | ||
instance_profile = "iam.ec2.demo" | ||
key_name = "ghost-demo" | ||
root_block_device = { | ||
name = "testblockdevice" | ||
size = 20 | ||
} | ||
optional_volumes = [{ | ||
device_name = "/dev/xvdd" | ||
volume_type = "gp2" | ||
volume_size = 20 | ||
}] | ||
subnet_ids = ["subnet-a7e849fe"] | ||
security_groups = ["sg-6814f60c"] | ||
instance_tags = [{ | ||
tag_name = "Name" | ||
tag_value = "wordpress" | ||
}, | ||
{ | ||
tag_name = "Type" | ||
tag_value = "front" | ||
}] | ||
} | ||
autoscale = { | ||
name = "autoscale" | ||
min = 1 | ||
max = 2 | ||
} | ||
modules = [{ | ||
name = "wordpress" | ||
pre_deploy = "" | ||
path = "/var/www" | ||
scope = "code" | ||
git_repo = "https://github.com/KnpLabs/KnpIpsum.git" | ||
}, | ||
{ | ||
name = "wordpress2" | ||
pre_deploy = "ZXhpdCAx" | ||
post_deploy = "ZXhpdCAx" | ||
path = "/var/www" | ||
scope = "code" | ||
git_repo = "https://github.com/KnpLabs/KnpIpsum.git" | ||
}] | ||
features = [{ | ||
version = "5.4" | ||
name = "php5" | ||
}, | ||
{ | ||
version = "2.2" | ||
name = "apache2" | ||
}] | ||
lifecycle_hooks = { | ||
pre_buildimage = "#!/usr/bin/env bash" | ||
} | ||
environment_variables = [{ | ||
key = "myvar2" | ||
value = "myvalue2" | ||
}] | ||
} | ||
`, name) | ||
} | ||
|
||
func testAccGhostAppConfigOmitEmpty(name string) string { | ||
return fmt.Sprintf(` | ||
resource "ghost_app" "test" { | ||
name = "%s" | ||
env = "dev" | ||
role = "webfront" | ||
region = "eu-west-2" | ||
instance_type = "t2.micro" | ||
vpc_id = "vpc-3f1eb65a" | ||
log_notifications = [ | ||
"[email protected]", | ||
] | ||
build_infos = { | ||
subnet_id = "subnet-a7e849fe" | ||
ssh_username = "admin" | ||
source_ami = "ami-03ce4474" | ||
} | ||
environment_infos = { | ||
instance_profile = "iam.ec2.demo" | ||
key_name = "ghost-demo" | ||
root_block_device = { | ||
name = "testblockdevice" | ||
size = 20 | ||
} | ||
optional_volumes = [{ | ||
device_name = "data" | ||
volume_type = "lol" | ||
volume_size = 20 | ||
}] | ||
subnet_ids = ["subnet-a7e849fe"] | ||
security_groups = ["sg-6814f60c"] | ||
instance_tags = [{ | ||
tag_name = "Name" | ||
tag_value = "wordpress" | ||
}, | ||
{ | ||
tag_name = "Type" | ||
tag_value = "front" | ||
}] | ||
} | ||
autoscale = { | ||
name = "autoscale" | ||
min = 0 | ||
max = 2 | ||
} | ||
modules = [{ | ||
name = "wordpress" | ||
pre_deploy = "" | ||
path = "/var/www" | ||
scope = "code" | ||
git_repo = "https://github.com/KnpLabs/KnpIpsum.git" | ||
}, | ||
{ | ||
name = "wordpress2" | ||
pre_deploy = "ZXhpdCAx" | ||
post_deploy = "ZXhpdCAx" | ||
path = "/var/www" | ||
scope = "code" | ||
git_repo = "https://github.com/KnpLabs/KnpIpsum.git" | ||
}] | ||
features = [{ | ||
version = "5.4" | ||
name = "php5" | ||
}, | ||
{ | ||
version = "2.2" | ||
name = "apache2" | ||
}] | ||
lifecycle_hooks = { | ||
pre_buildimage = "#!/usr/bin/env bash" | ||
} | ||
environment_variables = [{ | ||
key = "myvar2" | ||
value = "myvalue2" | ||
}] | ||
} | ||
`, name) | ||
} |