Skip to content

Commit

Permalink
either use embedded configs or FS configs, never both
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Jun 11, 2024
1 parent 1b8dfb6 commit cb8e165
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
default: chainlink-tests
required: false
tag:
description: The tag to use by default and to use for checking image existance
description: The tag to use by default and to use for checking image existence
default: ${{ github.sha }}
required: false
other_tags:
Expand Down
48 changes: 24 additions & 24 deletions integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,34 +312,34 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {
logger.Warn().Msgf("Number of Seth networks: %d", len(testConfig.Seth.Networks))
}
}
}

logger.Info().Msg("Reading configs from file system")
for _, fileName := range fileNames {
logger.Debug().Msgf("Looking for config file %s", fileName)
filePath, err := osutil.FindFile(fileName, osutil.DEFAULT_STOP_FILE_NAME, 3)
} else {
logger.Info().Msg("Reading configs from file system")
for _, fileName := range fileNames {
logger.Debug().Msgf("Looking for config file %s", fileName)
filePath, err := osutil.FindFile(fileName, osutil.DEFAULT_STOP_FILE_NAME, 3)

if err != nil && errors.Is(err, os.ErrNotExist) {
logger.Debug().Msgf("Config file %s not found", fileName)
continue
} else if err != nil {
return TestConfig{}, errors.Wrapf(err, "error looking for file %s", filePath)
}
logger.Debug().Str("location", filePath).Msgf("Found config file %s", fileName)
if err != nil && errors.Is(err, os.ErrNotExist) {
logger.Debug().Msgf("Config file %s not found", fileName)
continue
} else if err != nil {
return TestConfig{}, errors.Wrapf(err, "error looking for file %s", filePath)
}
logger.Debug().Str("location", filePath).Msgf("Found config file %s", fileName)

content, err := readFile(filePath)
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath)
}
content, err := readFile(filePath)
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath)
}

err = handleSpecialOverrides(logger, fileName, configurationName, &testConfig, content, product)
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath)
}
err = handleSpecialOverrides(logger, fileName, configurationName, &testConfig, content, product)
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath)
}

if testConfig.Seth != nil {
logger.Warn().Msgf("Ephemeral keys: %d", *testConfig.Seth.EphemeralAddrs)
logger.Warn().Msgf("Number of Seth networks: %d", len(testConfig.Seth.Networks))
if testConfig.Seth != nil {
logger.Warn().Msgf("Ephemeral keys: %d", *testConfig.Seth.EphemeralAddrs)
logger.Warn().Msgf("Number of Seth networks: %d", len(testConfig.Seth.Networks))
}
}
}

Expand Down

0 comments on commit cb8e165

Please sign in to comment.