Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ To display the profile in a browser, run:

## Configuration

The `loadtest` container reads test parameters from the file `loadtest.yml` the
The `loadtest` container reads test parameters from the file `loadtest.yml` (or the filename specified in the `CONFIG_FILE` environment variable) the
following parameters are available:

* `paymentAmountMsat`: the test amount that is paid
Expand Down
7 changes: 6 additions & 1 deletion loadtest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"errors"
"io/ioutil"
"os"

"gopkg.in/yaml.v2"
)
Expand Down Expand Up @@ -48,7 +49,11 @@ type config struct {
}

func loadConfig() (*config, error) {
yamlFile, err := ioutil.ReadFile("loadtest.yml")
configFile := os.Getenv("CONFIG_FILE")
if configFile == "" {
configFile = "loadtest.yaml"
}
yamlFile, err := ioutil.ReadFile(configFile)
if err != nil {
return nil, err
}
Expand Down