You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-14Lines changed: 28 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,37 +123,51 @@ make test
123
123
124
124
In order to run the full suite of Acceptance tests you will need to run the CloudStack Simulator. Please follow these steps to prepare an environment for running the Acceptance tests:
125
125
126
+
### Step 1: Start the CloudStack Simulator
127
+
126
128
```sh
127
-
docker pull apache/cloudstack-simulator
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
128
131
129
-
or pull it with a particular build tag
132
+
# Start the simulator container
133
+
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.20.2.0
134
+
```
130
135
131
-
docker pull apache/cloudstack-simulator:4.20.1.0
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.
132
137
133
-
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator
138
+
### Step 2: Wait for Simulator to be Ready
134
139
135
-
or
140
+
When Docker starts the container, wait a few minutes for it to fully initialize. You can check if it's ready by visiting <http://localhost:8080/client> and logging in as user `admin` with password `password`. You may need to wait and refresh the page for a few minutes before the login page is shown.
136
141
137
-
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.20.1.0
138
-
```
142
+
### Step 3: Deploy the Data Center (REQUIRED)
139
143
140
-
When Docker started the container you can go to <http://localhost:8080/client> and login to the CloudStack UI as user `admin` with password `password`. It can take a few minutes for the container is fully ready, so you probably need to wait and refresh the page for a few minutes before the login page is shown.
141
-
142
-
Once the login page is shown and you can login, you need to provision a simulated data-center:
144
+
**This step is critical!** Simply starting the simulator is not enough. You must run the data center deployment script to create the necessary CloudStack resources (zones, networks, service offerings, templates, etc.):
If you refresh the client or login again, you will now get passed the initial welcome screen and be able to go to your account details and retrieve the API key and secret. Export those together with the URL:
150
+
This script creates the "Sandbox-simulator" zone and other resources that the acceptance tests expect. **Without this step, most tests will fail with "zone not found" errors.**
151
+
152
+
**Note:** This deployment script takes approximately **2-3 minutes** to complete. Wait for it to finish before proceeding to the next step. You should see output like "====Deploy DC Successful=====" when it's done.
153
+
154
+
### Step 4: Get API Credentials
155
+
156
+
After deploying the data center, refresh the CloudStack UI and log in again. You will now be able to access your account details and retrieve the API key and secret. Export those together with the URL:
In order for all the tests to pass, you will need to create a new (empty) project in the UI called `terraform`. When the project is created you can run the Acceptance tests against the CloudStack Simulator by simply running:
164
+
### Step 5: Create Required Resources
165
+
166
+
In order for all the tests to pass, you will need to create a new (empty) project in the UI called `terraform`.
167
+
168
+
### Step 6: Run the Tests
169
+
170
+
When the project is created you can run the Acceptance tests against the CloudStack Simulator by simply running:
0 commit comments