Skip to content

Commit

Permalink
make sure 1 and only 1 OCR config is set in TOML
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Jun 25, 2024
1 parent 2387d78 commit 6d96172
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions integration-tests/testsetups/ocr.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ func WithForwarderFlow(forwarderFlow bool) OCRSoakTestOption {

// NewOCRSoakTest creates a new OCR soak test to setup and run
func NewOCRSoakTest(t *testing.T, config *tc.TestConfig, opts ...OCRSoakTestOption) (*OCRSoakTest, error) {
if config.OCR2 != nil && config.OCR != nil {
return nil, fmt.Errorf("both OCR and OCR2 are set. Please check your TOML config and make sure you only have one of them set")
}

if config.GetActiveOCRConfig() == nil {
return nil, fmt.Errorf("no OCR[1/2] config not set. Please check your TOML config and make sure you have an OCR[1/2] config set")
}

test := &OCRSoakTest{
Config: config,
TestReporter: testreporters.OCRSoakTestReporter{
Expand Down

0 comments on commit 6d96172

Please sign in to comment.