Skip to content

Commit 62623c3

Browse files
committed
Clean up tests for 4.20.1.0
1 parent c5356b1 commit 62623c3

File tree

2 files changed

+1
-63
lines changed

2 files changed

+1
-63
lines changed

cloudstack/resource_cloudstack_project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func getProjectByID(cs *cloudstack.CloudStackClient, id string) (*cloudstack.Pro
157157
}
158158

159159
if l.Count == 0 {
160-
return nil, fmt.Errorf("Project with ID %s not found", id)
160+
return nil, fmt.Errorf("project with id %s not found", id)
161161
}
162162

163163
return l.Projects[0], nil

cloudstack/resource_cloudstack_project_test.go

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ func TestAccCloudStackProject_updateUserid(t *testing.T) {
205205
"cloudstack_project.baz", "name", "terraform-test-project-userid"),
206206
resource.TestCheckResourceAttr(
207207
"cloudstack_project.baz", "display_text", "Terraform Test Project with Userid"),
208-
resource.TestCheckResourceAttr(
209-
"cloudstack_project.baz", "userid", "075655af-c1cb-11ee-9946-0242ac110003"),
210208
),
211209
},
212210
{
@@ -218,46 +216,6 @@ func TestAccCloudStackProject_updateUserid(t *testing.T) {
218216
"cloudstack_project.baz", "name", "terraform-test-project-userid-updated"),
219217
resource.TestCheckResourceAttr(
220218
"cloudstack_project.baz", "display_text", "Terraform Test Project with Userid Updated"),
221-
resource.TestCheckResourceAttr(
222-
"cloudstack_project.baz", "userid", "075655af-c1cb-11ee-9946-0242ac110003"),
223-
),
224-
},
225-
},
226-
})
227-
}
228-
229-
func TestAccCloudStackProject_updateAccountid(t *testing.T) {
230-
var project cloudstack.Project
231-
232-
resource.Test(t, resource.TestCase{
233-
PreCheck: func() { testAccPreCheck(t) },
234-
Providers: testAccProviders,
235-
CheckDestroy: testAccCheckCloudStackProjectDestroy,
236-
Steps: []resource.TestStep{
237-
{
238-
Config: testAccCloudStackProject_accountid,
239-
Check: resource.ComposeTestCheckFunc(
240-
testAccCheckCloudStackProjectExists(
241-
"cloudstack_project.qux", &project),
242-
resource.TestCheckResourceAttr(
243-
"cloudstack_project.qux", "name", "terraform-test-project-accountid"),
244-
resource.TestCheckResourceAttr(
245-
"cloudstack_project.qux", "display_text", "Terraform Test Project with Accountid"),
246-
resource.TestCheckResourceAttr(
247-
"cloudstack_project.qux", "accountid", "0756244c-c1cb-11ee-9946-0242ac110003"),
248-
),
249-
},
250-
{
251-
Config: testAccCloudStackProject_updateAccountid,
252-
Check: resource.ComposeTestCheckFunc(
253-
testAccCheckCloudStackProjectExists(
254-
"cloudstack_project.qux", &project),
255-
resource.TestCheckResourceAttr(
256-
"cloudstack_project.qux", "name", "terraform-test-project-accountid-updated"),
257-
resource.TestCheckResourceAttr(
258-
"cloudstack_project.qux", "display_text", "Terraform Test Project with Accountid Updated"),
259-
resource.TestCheckResourceAttr(
260-
"cloudstack_project.qux", "accountid", "0756244c-c1cb-11ee-9946-0242ac110003"),
261219
),
262220
},
263221
},
@@ -355,33 +313,13 @@ const testAccCloudStackProject_userid = `
355313
resource "cloudstack_project" "baz" {
356314
name = "terraform-test-project-userid"
357315
display_text = "Terraform Test Project with Userid"
358-
userid = "075655af-c1cb-11ee-9946-0242ac110003"
359-
accountid = "0756244c-c1cb-11ee-9946-0242ac110003"
360316
domain = "ROOT"
361317
}`
362318

363319
const testAccCloudStackProject_updateUserid = `
364320
resource "cloudstack_project" "baz" {
365321
name = "terraform-test-project-userid-updated"
366322
display_text = "Terraform Test Project with Userid Updated"
367-
userid = "075655af-c1cb-11ee-9946-0242ac110003"
368-
accountid = "0756244c-c1cb-11ee-9946-0242ac110003"
369-
domain = "ROOT"
370-
}`
371-
372-
const testAccCloudStackProject_accountid = `
373-
resource "cloudstack_project" "qux" {
374-
name = "terraform-test-project-accountid"
375-
display_text = "Terraform Test Project with Accountid"
376-
accountid = "0756244c-c1cb-11ee-9946-0242ac110003"
377-
domain = "ROOT"
378-
}`
379-
380-
const testAccCloudStackProject_updateAccountid = `
381-
resource "cloudstack_project" "qux" {
382-
name = "terraform-test-project-accountid-updated"
383-
display_text = "Terraform Test Project with Accountid Updated"
384-
accountid = "0756244c-c1cb-11ee-9946-0242ac110003"
385323
domain = "ROOT"
386324
}`
387325

0 commit comments

Comments
 (0)