1
1
/*
2
- Copyright 2020 The Kubernetes Authors.
2
+ Copyright 2022 The Kubernetes Authors.
3
3
4
4
Licensed under the Apache License, Version 2.0 (the "License");
5
5
you may not use this file except in compliance with the License.
@@ -40,15 +40,15 @@ func DeployAppToxiSpec(ctx context.Context, inputGetter func() CommonSpecInput)
40
40
namespace * corev1.Namespace
41
41
cancelWatches context.CancelFunc
42
42
clusterResources * clusterctl.ApplyClusterTemplateAndWaitResult
43
+ toxicName string
44
+ toxiProxyContext * helpers.ToxiProxyContext = nil
43
45
appName = "httpd"
44
46
appManifestPath = "data/fixture/sample-application.yaml"
45
47
expectedHtmlPath = "data/fixture/expected-webpage.html"
46
48
appDeploymentReadyTimeout = 180
47
49
appPort = 8080
48
50
appDefaultHtmlPath = "/"
49
51
expectedHtml = ""
50
- toxiProxyContext * helpers.ToxiProxyContext = nil
51
- toxicName string
52
52
)
53
53
54
54
BeforeEach (func () {
@@ -64,8 +64,11 @@ func DeployAppToxiSpec(ctx context.Context, inputGetter func() CommonSpecInput)
64
64
Expect (input .E2EConfig .Variables ).To (HaveKey (KubernetesVersion ))
65
65
66
66
// Setup a toxiProxy for this test.
67
- toxiProxyContext = helpers .SetupForToxiproxyTesting (input .BootstrapClusterProxy )
68
- toxicName = toxiProxyContext .AddLatencyToxic (100 , 10 , 100 , false )
67
+ toxiProxyContext = helpers .SetupForToxiProxyTesting (input .BootstrapClusterProxy )
68
+ const TOXIC_LATENCY_MS = 100
69
+ const TOXIC_JITTER_MS = 100
70
+ const TOXIC_TOXICITY = 1
71
+ toxicName = toxiProxyContext .AddLatencyToxic (TOXIC_LATENCY_MS , TOXIC_JITTER_MS , TOXIC_TOXICITY , false )
69
72
70
73
// Setup a Namespace where to host objects for this spec and create a watcher for the namespace events.
71
74
namespace , cancelWatches = setupSpecNamespace (ctx , specName , toxiProxyContext .ClusterProxy , input .ArtifactFolder )
0 commit comments