Skip to content

Commit

Permalink
Pepare release v0.6.0 (#157)
Browse files Browse the repository at this point in the history
* Improve e5e/frontier guide wording

* Prepare release v0.6.0

* Add missing change to CHANGELOG

* Fix cpu_performance_type in integration tests

* Add sleep in frontier integration tests
  • Loading branch information
anx-mschaefer committed Mar 21, 2024
1 parent 1693040 commit d0603e4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ If the change isn't user-facing but still relevant enough for a changelog entry,
* (internal)? scope: short description (#pr, @author)
-->

## [0.6.0] - 2024-03-21

### Breaking
* terraform cli 1.0 or later required from now on (#153, @anx-mschaefer)

### Changed
* (internal) resource/anxcloud_virtual_server: optimize creation of vms with multiple disks (#147, @anx-mschaefer)
* provider server: updated to protocol version 6 (#153, @anx-mschaefer)

### Added
* resources to manage the e5e service: (#142, @anx-mschaefer)
Expand Down
4 changes: 4 additions & 0 deletions anxcloud/resource_frontier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http"
"strings"
"testing"
"time"

"github.com/anexia-it/terraform-provider-anxcloud/anxcloud/testutils/environment"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand Down Expand Up @@ -68,6 +69,9 @@ func TestAccAnxCloudFrontier(t *testing.T) {
return fmt.Errorf("anxcloud_frontier_api.foo not found in state")
}

// wait a few seconds for frontier to update
time.Sleep(20 * time.Second)

resp, err := http.Get(fmt.Sprintf("https://frontier.anexia-it.com/%s/foo/bar/baz", api.Primary.ID))
if err != nil {
return fmt.Errorf("http: get mock frontier endpoint: %w", err)
Expand Down
23 changes: 12 additions & 11 deletions anxcloud/resource_virtual_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestAccAnxCloudVirtualServer(t *testing.T) {
Memory: 2048,
CPUs: 2,
Sockets: 2,
CPUPerformanceType: "performance",
CPUPerformanceType: "performance-intel",
Disk: 50,
DiskType: "ENT6",
Network: []vm.Network{createNewNetworkInterface(envInfo)},
Expand Down Expand Up @@ -164,7 +164,7 @@ func TestAccAnxCloudVirtualServerFromScratch(t *testing.T) {
Memory: 2048,
CPUs: 2,
Sockets: 2,
CPUPerformanceType: "performance",
CPUPerformanceType: "performance-intel",
Disk: 50,
DiskType: "ENT6",
Network: []vm.Network{createNewNetworkInterface(envInfo)},
Expand Down Expand Up @@ -203,7 +203,7 @@ func TestAccAnxCloudVirtualServerMultiDiskScaling(t *testing.T) {
Memory: 2048,
CPUs: 2,
Sockets: 2,
CPUPerformanceType: "performance",
CPUPerformanceType: "performance-intel",
Network: []vm.Network{createNewNetworkInterface(envInfo)},
DNS1: "8.8.8.8",
Password: "flatcar#1234$%%",
Expand Down Expand Up @@ -405,13 +405,14 @@ func testAccConfigAnxCloudVirtualServer(resourceName string, templateName string
func testAccConfigAnxCloudVirtualServerMultiDiskSupport(resourceName string, def *vm.Definition, disks []vm.Disk) string {
return fmt.Sprintf(`
resource "anxcloud_virtual_server" "%s" {
location_id = "%s"
template_id = "%s"
template_type = "%s"
hostname = "%s"
cpus = %d
memory = %d
password = "%s"
location_id = "%s"
template_id = "%s"
template_type = "%s"
hostname = "%s"
cpus = %d
cpu_performance_type = "%s"
memory = %d
password = "%s"
// generated network string
%s
Expand All @@ -422,7 +423,7 @@ func testAccConfigAnxCloudVirtualServerMultiDiskSupport(resourceName string, def
force_restart_if_needed = true
critical_operation_confirmed = true
}
`, resourceName, def.Location, def.TemplateID, def.TemplateType, def.Hostname, def.CPUs, def.Memory,
`, resourceName, def.Location, def.TemplateID, def.TemplateType, def.Hostname, def.CPUs, def.CPUPerformanceType, def.Memory,
def.Password, generateNetworkSubResourceString(def.Network), generateDisksSubResourceString(disks))
}

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/e5e-frontier-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ resource "anxcloud_frontier_deployment" "v1" {
api = anxcloud_frontier_api.example.id
# Changes to the `revision` attribute will trigger a new deployment
# TODO(user): value should be replaced by something more suitible in production (e.g. commit hash passed in via variable)
# TODO(user): value should be replaced with something more suitible in production (e.g. commit hash passed in via variable)
revision = random_id.revision.hex
depends_on = [
Expand Down

0 comments on commit d0603e4

Please sign in to comment.