@@ -109,50 +109,6 @@ func TestAccScalewayCockpitToken_Basic(t *testing.T) {
109109 })
110110}
111111
112- func TestAccScalewayCockpitToken_NoScopes (t * testing.T ) {
113- tt := NewTestTools (t )
114- defer tt .Cleanup ()
115-
116- projectName := "tf_tests_cockpit_token_basic"
117- tokenName := "tf_tests_cockpit_token_basic"
118-
119- resource .ParallelTest (t , resource.TestCase {
120- PreCheck : func () { testAccPreCheck (t ) },
121- ProviderFactories : tt .ProviderFactories ,
122- CheckDestroy : testAccCheckScalewayCockpitTokenDestroy (tt ),
123- Steps : []resource.TestStep {
124- {
125- Config : fmt .Sprintf (`
126- resource "scaleway_account_project" "project" {
127- name = "%[1]s"
128- }
129-
130- resource scaleway_cockpit main {
131- project_id = scaleway_account_project.project.id
132- }
133-
134- resource scaleway_cockpit_token main {
135- project_id = scaleway_cockpit.main.project_id
136- name = "%[2]s"
137- }
138- ` , projectName , tokenName ),
139- Check : resource .ComposeTestCheckFunc (
140- testAccCheckScalewayCockpitTokenExists (tt , "scaleway_cockpit_token.main" ),
141- resource .TestCheckResourceAttrPair ("scaleway_cockpit_token.main" , "project_id" , "scaleway_cockpit.main" , "project_id" ),
142- resource .TestCheckResourceAttrSet ("scaleway_cockpit_token.main" , "secret_key" ),
143- resource .TestCheckResourceAttr ("scaleway_cockpit_token.main" , "name" , tokenName ),
144- resource .TestCheckResourceAttr ("scaleway_cockpit_token.main" , "scopes.0.query_metrics" , "false" ),
145- resource .TestCheckResourceAttr ("scaleway_cockpit_token.main" , "scopes.0.write_metrics" , "true" ),
146- resource .TestCheckResourceAttr ("scaleway_cockpit_token.main" , "scopes.0.setup_metrics_rules" , "false" ),
147- resource .TestCheckResourceAttr ("scaleway_cockpit_token.main" , "scopes.0.query_logs" , "false" ),
148- resource .TestCheckResourceAttr ("scaleway_cockpit_token.main" , "scopes.0.write_logs" , "true" ),
149- resource .TestCheckResourceAttr ("scaleway_cockpit_token.main" , "scopes.0.setup_logs_rules" , "false" ),
150- ),
151- },
152- },
153- })
154- }
155-
156112func TestAccScalewayCockpitToken_Update (t * testing.T ) {
157113 tt := NewTestTools (t )
158114 defer tt .Cleanup ()
0 commit comments