Skip to content

Commit 47e4bef

Browse files
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 20bf09d commit 47e4bef

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ In order to run the full suite of Acceptance tests you will need to run the Clou
126126
### Step 1: Start the CloudStack Simulator
127127

128128
```sh
129-
# Pull the simulator image (recommended versions: 4.20.1.0 or 4.23.0.0-SNAPSHOT)
130-
docker pull apache/cloudstack-simulator:4.20.1.0
129+
# Pull the simulator image (recommended versions: 4.20.2.0 or 4.23.0.0-SNAPSHOT)
130+
docker pull apache/cloudstack-simulator:4.20.2.0
131131

132132
# Start the simulator container
133-
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.20.1.0
133+
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.20.2.0
134134
```
135135

136-
**Note:** Version 4.22.0.0 has a known bug with updating load balancer rules and is not recommended for testing.
136+
**Note:** Version 4.22.0.0 has a known bug with updating load balancer rules. CI currently tests against this version, but for local testing we recommend using 4.20.2.0 or 4.23.0.0-SNAPSHOT to avoid this issue.
137137

138138
### Step 2: Wait for Simulator to be Ready
139139

cloudstack/resource_cloudstack_loadbalancer_rule_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func TestAccCloudStackLoadBalancerRule_update(t *testing.T) {
5858
// that causes "530 Internal Server Error" when updating load balancer rules.
5959
// This bug does not exist in 4.20.1.0, 4.22.1.0+, or 4.23.0.0+.
6060
// See: https://github.com/apache/cloudstack/issues/XXXXX (if applicable)
61+
testAccPreCheck(t)
6162
version := getCloudStackVersion(t)
6263
if version == "4.22.0.0" {
6364
t.Skip("Skipping TestAccCloudStackLoadBalancerRule_update on CloudStack 4.22.0.0 due to known simulator bug (Error 530: Internal Server Error)")

cloudstack/service_offering_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (state *serviceOfferingCommonResourceModel) commonRead(ctx context.Context,
8181
// Only set DiskOfferingId if it was already set in the state (i.e., user explicitly provided it)
8282
// When using disk_offering block, CloudStack creates an internal disk offering and returns its ID,
8383
// but we should not populate disk_offering_id in that case to avoid drift
84-
if cs.Diskofferingid != "" && !state.DiskOfferingId.IsNull() {
84+
if cs.Diskofferingid != "" && !state.DiskOfferingId.IsNull() && !state.DiskOfferingId.IsUnknown() {
8585
state.DiskOfferingId = types.StringValue(cs.Diskofferingid)
8686
}
8787
if cs.Displaytext != "" {

0 commit comments

Comments
 (0)