Skip to content

Commit

Permalink
Merge pull request #250 from gridscale/bug/fix-tests
Browse files Browse the repository at this point in the history
Tidy up tests
  • Loading branch information
miha-m authored Feb 2, 2024
2 parents 7cdf4a3 + d86326b commit 6725b7c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 64 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/security_zone.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Alternatively, this documentation can also be found within this repository. Chec
| Load balancer (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/loadbalancer.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/loadbalancer.yml) |
| PaaS (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/paas.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/paas.yml) |
| K8S (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/k8s.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/k8s.yml) |
| MySQL (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mysql.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mysql.yml) |
| MySQL (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mysql8_0.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mysql8_0.yml) |
| MSSQL (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mssql.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mssql.yml) |
| MariaDB (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mariadb.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/mariadb.yml) |
| Postgres (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/postgres.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/postgres.yml) |
Expand All @@ -52,7 +52,6 @@ Alternatively, this documentation can also be found within this repository. Chec
| Object storage (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/object_storage.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/object_storage.yml) |
| IP address (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/ipv4_ipv6.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/ipv4_ipv6.yml) |
| Network (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/network.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/network.yml) |
| Security zone (PaaS) (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/security_zone.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/security_zone.yml) |
| Firewall (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/firewall.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/firewall.yml) |
| SSH key (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/sshkey.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/sshkey.yml) |
| ISO Image (CRUD) | :heavy_check_mark: | [![Build status](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/isoimage.yml/badge.svg?branch=master)](https://github.com/gridscale/terraform-provider-gridscale/actions/workflows/isoimage.yml) |
Expand All @@ -76,7 +75,7 @@ To test the provider, simply run

$ make test

To run the full suite of acceptance tests execute `make testacc`. You will need to set `GRIDSCALE_UUID`, `GRIDSCALE_TOKEN`, and `GRIDSCALE_URL` environment variables to point to an existing project when running acceptance tests.
To run the full suite of acceptance tests execute `make testacc` you will need to set `GRIDSCALE_UUID`, `GRIDSCALE_TOKEN`, and `GRIDSCALE_URL` environment variables to point to an existing project when running acceptance tests.

*Note:* acceptance tests create real resources and often cost money to run.

Expand Down
4 changes: 2 additions & 2 deletions gridscale/datasource_gridscale_paas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAccdataSourceGridscalePaaS_basic(t *testing.T) {
Config: testAccCheckDataSourcePaaSConfig_basic(name),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("data.gridscale_paas.foo", "name", name),
resource.TestCheckResourceAttr("data.gridscale_paas.foo", "service_template_uuid", "8bcb216c-65ec-4c93-925d-1b8feaa5c2c5"),
resource.TestCheckResourceAttr("data.gridscale_paas.foo", "service_template_uuid", "d7a5e8ec-fa78-4d1b-86f9-febe3e16e398"),
),
},
},
Expand All @@ -31,7 +31,7 @@ func testAccCheckDataSourcePaaSConfig_basic(name string) string {
return fmt.Sprintf(`
resource "gridscale_paas" "foo" {
name = "%s"
service_template_uuid = "8bcb216c-65ec-4c93-925d-1b8feaa5c2c5"
service_template_uuid = "d7a5e8ec-fa78-4d1b-86f9-febe3e16e398"
parameter {
param = "mysql_max_connections"
value = "2000"
Expand Down
16 changes: 3 additions & 13 deletions gridscale/resource_gridscale_paas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func testAccCheckResourceGridscalePaaSConfig_basic(name string) string {
return fmt.Sprintf(`
resource "gridscale_paas" "foopaas" {
name = "%s"
service_template_uuid = "8bcb216c-65ec-4c93-925d-1b8feaa5c2c5"
service_template_uuid = "d7a5e8ec-fa78-4d1b-86f9-febe3e16e398"
}
`, name)
}
Expand All @@ -108,7 +108,7 @@ func testAccCheckResourceGridscalePaaSConfig_basic_update() string {
return fmt.Sprintf(`
resource "gridscale_paas" "foopaas" {
name = "newname"
service_template_uuid = "8bcb216c-65ec-4c93-925d-1b8feaa5c2c5"
service_template_uuid = "d7a5e8ec-fa78-4d1b-86f9-febe3e16e398"
resource_limit {
resource = "cores"
limit = 16
Expand All @@ -118,11 +118,6 @@ resource "gridscale_paas" "foopaas" {
value = "2000"
type = "float"
}
parameter {
param = "mysql_query_cache"
value = "true"
type = "bool"
}
parameter {
param = "mysql_default_time_zone"
value = "UTC"
Expand All @@ -138,7 +133,7 @@ func testAccCheckResourceGridscalePaaSConfig_tmp_update() string {
return fmt.Sprintf(`
resource "gridscale_paas" "foopaas" {
name = "newname"
service_template_uuid = "8bcb216c-65ec-4c93-925d-1b8feaa5c2c5"
service_template_uuid = "d7a5e8ec-fa78-4d1b-86f9-febe3e16e398"
resource_limit {
resource = "cores"
limit = 16
Expand All @@ -148,11 +143,6 @@ resource "gridscale_paas" "foopaas" {
value = "2000"
type = "float"
}
parameter {
param = "mysql_query_cache"
value = "true"
type = "bool"
}
parameter {
param = "mysql_default_time_zone"
value = "UTC"
Expand Down

0 comments on commit 6725b7c

Please sign in to comment.