Skip to content

Commit 09270a2

Browse files
authored
Fix disk pressure issue in lxd proxy tests (#3196)
1 parent 33bd094 commit 09270a2

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

e2e/proxy_test.go

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestProxiedEnvironment(t *testing.T) {
4040

4141
tc := lxd.NewCluster(&lxd.ClusterInput{
4242
T: t,
43-
Nodes: 4,
43+
Nodes: 3,
4444
WithProxy: true,
4545
Image: "debian/12",
4646
LicensePath: "licenses/snapshot-license.yaml",
@@ -96,14 +96,11 @@ func TestProxiedEnvironment(t *testing.T) {
9696
t.Logf("node 1 joined, sleeping...")
9797
time.Sleep(30 * time.Second)
9898

99-
// join another controller node
100-
joinControllerNode(t, tc, 2)
101-
10299
// join a worker node
103-
joinWorkerNode(t, tc, 3)
100+
joinWorkerNode(t, tc, 2)
104101

105102
// wait for the nodes to report as ready.
106-
waitForNodes(t, tc, 4, nil)
103+
waitForNodes(t, tc, 3, nil)
107104

108105
// check the installation state
109106
checkInstallationState(t, tc)
@@ -137,12 +134,6 @@ func TestProxiedEnvironment(t *testing.T) {
137134
// reset the cluster
138135
runInParallel(t,
139136
func(t *testing.T) error {
140-
stdout, stderr, err := resetInstallationWithError(t, tc, 3, resetInstallationOptions{force: true})
141-
if err != nil {
142-
return fmt.Errorf("fail to reset the installation on node 3: %v: %s: %s", err, stdout, stderr)
143-
}
144-
return nil
145-
}, func(t *testing.T) error {
146137
stdout, stderr, err := resetInstallationWithError(t, tc, 2, resetInstallationOptions{force: true})
147138
if err != nil {
148139
return fmt.Errorf("fail to reset the installation on node 2: %v: %s: %s", err, stdout, stderr)
@@ -210,7 +201,7 @@ func TestInstallWithMITMProxy(t *testing.T) {
210201

211202
tc := lxd.NewCluster(&lxd.ClusterInput{
212203
T: t,
213-
Nodes: 4,
204+
Nodes: 3,
214205
WithProxy: true,
215206
Image: "debian/12",
216207
EmbeddedClusterPath: "../output/bin/embedded-cluster",
@@ -271,14 +262,11 @@ func TestInstallWithMITMProxy(t *testing.T) {
271262
t.Logf("node 1 joined, sleeping...")
272263
time.Sleep(30 * time.Second)
273264

274-
// join another controller node
275-
joinControllerNode(t, tc, 2)
276-
277265
// join a worker node
278-
joinWorkerNode(t, tc, 3)
266+
joinWorkerNode(t, tc, 2)
279267

280268
// wait for the nodes to report as ready.
281-
waitForNodes(t, tc, 4, nil)
269+
waitForNodes(t, tc, 3, nil)
282270

283271
// check the installation state
284272
checkInstallationState(t, tc)
@@ -308,12 +296,6 @@ func TestInstallWithMITMProxy(t *testing.T) {
308296
// reset the cluster
309297
runInParallel(t,
310298
func(t *testing.T) error {
311-
stdout, stderr, err := resetInstallationWithError(t, tc, 3, resetInstallationOptions{force: true})
312-
if err != nil {
313-
return fmt.Errorf("fail to reset the installation on node 3: %v: %s: %s", err, stdout, stderr)
314-
}
315-
return nil
316-
}, func(t *testing.T) error {
317299
stdout, stderr, err := resetInstallationWithError(t, tc, 2, resetInstallationOptions{force: true})
318300
if err != nil {
319301
return fmt.Errorf("fail to reset the installation on node 2: %v: %s: %s", err, stdout, stderr)

0 commit comments

Comments
 (0)