Skip to content

Commit

Permalink
Merge pull request #33 from hammingweight/get-rid-of-bash-script
Browse files Browse the repository at this point in the history
Remove bash test runner script.
  • Loading branch information
hammingweight authored Feb 7, 2025
2 parents 37befa8 + 6fed8dc commit 6169854
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 10 additions & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

var client *rest.SynkClient

func init() {
func getConfigFromVars() *configuration.Configuration {
// If we can't create a client, no tests will pass so
// we just panic if something goes wrong.
username := os.Getenv("TEST_USER")
Expand All @@ -53,6 +53,15 @@ func init() {
panic("the TEST_INVERTER_SN environment variable must be set")
}
config.DefaultInverterSN = serialNumber
return config
}

func init() {
configFile, _ := configuration.DefaultConfigurationFile()
config, err := configuration.ReadConfigurationFromFile(configFile)
if err != nil {
config = getConfigFromVars()
}

// Allow multiple attempts to authenticate, in case of flakiness somewhere.
// Also, increase the delay between attempts.
Expand Down
6 changes: 0 additions & 6 deletions integration/run.sh

This file was deleted.

0 comments on commit 6169854

Please sign in to comment.