Skip to content

Commit

Permalink
Docs for Eventing upgrade tests config overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Aug 24, 2020
1 parent 28396b7 commit bbc054f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
18 changes: 18 additions & 0 deletions test/upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,21 @@ Diagram below describe the setup:
+--------+ +---------+ |
(default) +----------+
```

#### Probe test configuration

Probe test behavior can be influenced from outside without modifying its source
code. That can be beneficial if one would like to run upgrade tests in different
context. One such example might be running Eventing upgrade tests in place that
have Serving and Eventing both installed. In such environment one can set
environment variable `E2E_UPGRADE_TESTS_SERVING_USE` to enable usage of ksvc
forwarder (which is disabled by default):

```
$ export E2E_UPGRADE_TESTS_SERVING_USE=true
```

Any option, apart from namespace, in
[`knative.dev/eventing/test/upgrade/prober.Config`](https://github.com/knative/eventing/blob/022e281/test/upgrade/prober/prober.go#L52-L63)
struct can be influenced, by using `E2E_UPGRADE_TESTS_XXXXX` environmental
variable prefix (using [kelseyhightower/envconfig](https://github.com/kelseyhightower/envconfig#usage) usage).
19 changes: 10 additions & 9 deletions test/upgrade/prober/prober.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,20 @@ type ServingConfig struct {
}

func NewConfig(namespace string) *Config {
servingConfig := ServingConfig{
Use: false,
ScaleToZero: true,
}
err := envconfig.Process("e2e_upgrade_tests_serving", &servingConfig)
ensure.NoError(err)
return &Config{
Namespace: namespace,
config := &Config{
Namespace: "",
Interval: Interval,
FinishedSleep: 5 * time.Second,
FailOnErrors: true,
Serving: servingConfig,
Serving: ServingConfig{
Use: false,
ScaleToZero: true,
},
}
err := envconfig.Process("e2e_upgrade_tests", config)
ensure.NoError(err)
config.Namespace = namespace
return config
}

// RunEventProber starts a single Prober of the given domain.
Expand Down

0 comments on commit bbc054f

Please sign in to comment.