@@ -24,6 +24,31 @@ func TestAccSpinnakerApplication_basic(t *testing.T) {
24
24
testAccCheckApplicationExists (resourceName ),
25
25
resource .TestCheckResourceAttr (resourceName , "application" , rName ),
26
26
resource .
TestCheckResourceAttr (
resourceName ,
"email" ,
"[email protected] " ),
27
+ resource .TestCheckResourceAttr (resourceName , "description" , "" ),
28
+ resource .TestCheckResourceAttr (resourceName , "platformHealthOnly" , "false" ),
29
+ resource .TestCheckResourceAttr (resourceName , "platformHealthOnly" , "false" ),
30
+ ),
31
+ },
32
+ },
33
+ })
34
+ }
35
+
36
+ func TestAccSpinnakerApplication_nondefault (t * testing.T ) {
37
+ resourceName := "spinnaker_application.test"
38
+ rName := acctest .RandomWithPrefix ("tf-acc-test" )
39
+ resource .ParallelTest (t , resource.TestCase {
40
+ PreCheck : func () { testAccPreCheck (t ) },
41
+ Providers : testAccProviders ,
42
+ Steps : []resource.TestStep {
43
+ {
44
+ Config : testAccSpinnakerApplication_basic (rName ),
45
+ Check : resource .ComposeTestCheckFunc (
46
+ testAccCheckApplicationExists (resourceName ),
47
+ resource .TestCheckResourceAttr (resourceName , "application" , rName ),
48
+ resource .
TestCheckResourceAttr (
resourceName ,
"email" ,
"[email protected] " ),
49
+ resource .TestCheckResourceAttr (resourceName , "description" , "My application" ),
50
+ resource .TestCheckResourceAttr (resourceName , "platformHealthOnly" , "true" ),
51
+ resource .TestCheckResourceAttr (resourceName , "platformHealthOnlyShowOverride" , "true" ),
27
52
),
28
53
},
29
54
},
@@ -70,3 +95,15 @@ resource "spinnaker_application" "test" {
70
95
}
71
96
` , rName )
72
97
}
98
+
99
+ func testAccSpinnakerApplication_nondefault (rName string ) string {
100
+ return fmt .Sprintf (`
101
+ resource "spinnaker_application" "test" {
102
+ application = %q
103
+
104
+ description = "My application"
105
+ platform_health_only = true
106
+ platform_health_only_show_override = true
107
+ }
108
+ ` , rName )
109
+ }
0 commit comments