Skip to content

Tests: Add support for endpoints with same path but different method#4382

Open
osulzhenko wants to merge 8 commits into
masterfrom
functional-tests/extend-endpoints
Open

Tests: Add support for endpoints with same path but different method#4382
osulzhenko wants to merge 8 commits into
masterfrom
functional-tests/extend-endpoints

Conversation

@osulzhenko

@osulzhenko osulzhenko commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

What's the context for the changes?

🧠 Rationale behind the change

Why did you choose to make these changes? Were there any trade-offs you had to consider?

🔎 New Bid Adapter Checklist

  • verify email contact works
  • NO fully dynamic hostnames
  • geographic host parameters are NOT required
  • direct use of HTTP is prohibited - implement an existing Bidder interface that will do all the job
  • if the ORTB is just forwarded to the endpoint, use the generic adapter - define the new adapter as the alias of the generic adapter
  • cover an adapter configuration with an integration test

🧪 Test plan

How do you know the changes are safe to ship to production?

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

@osulzhenko
osulzhenko requested a review from marki1an February 10, 2026 12:21
@osulzhenko osulzhenko added the tests Functional or other tests label Feb 10, 2026

@marki1an marki1an left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also would be good to see tests for:

AMP_GET("GET /openrtb2/amp")
AMP_POST("POST /openrtb2/amp")

return Future.failedFuture(exception);
} else if (exception instanceof PreBidException) {
unknownAccountLogger.warn(accountErrorMessage(exception.getMessage(), httpRequest), 100);
unknownAccountLogger.warn(accountErrorMessage(exception.getMessage(), httpRequest), logSamplingRate);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core changes?

import org.prebid.server.functional.service.PrebidServerException
import org.prebid.server.functional.service.PrebidServerService
import org.prebid.server.functional.util.PBSUtils
import spock.lang.IgnoreRest

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove please

flushMetrics(pbsServiceWithMultipleModules)

and: "Save base active account"
def account = new Account(uuid: bidRequest.getAccountId(), status: ACTIVE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to add a new Account with status active if we have a default account in the config?
Looks strange

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this because of the 'settings.enforce-valid-account': 'true' setting. If set to false, it ignores invalid accounts and won't emit errors for unknownAccountLogger

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we can remove defaultAccountConfigSettings

flushMetrics(pbsServiceWithMultipleModules)

and: "Save account without modules config"
def account = new Account(uuid: bidRequest.getAccountId(), status: ACTIVE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, weird behaviour.
Test describe says that it shouldn't call any module without an account config

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the test name

when: "PBS processes auction request"
pbsServiceWithMultipleModule.sendAuctionRequest(bidRequest)

then: "PBS response should include trace information about called modules"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong descriptions

assert !response.ext?.warnings
assert !response.ext?.errors

and: "PBS log should contain message"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong description

flushMetrics(pbsServiceWithMultipleModules)

and: "Save account without modules config"
def account = new Account(uuid: bidRequest.getAccountId(), status: ACTIVE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the test name

flushMetrics(pbsServiceWithMultipleModules)

and: "Save base active account"
def account = new Account(uuid: bidRequest.getAccountId(), status: ACTIVE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we can remove defaultAccountConfigSettings

Base automatically changed from extend-endpoints to master July 23, 2026 14:36
@osulzhenko
osulzhenko force-pushed the functional-tests/extend-endpoints branch from c244d6a to fe300c1 Compare July 24, 2026 10:39
# Conflicts:
#	src/main/java/org/prebid/server/json/deserializer/ExecutionPlanEndpointsConfigDeserializer.java
#	src/main/java/org/prebid/server/model/Endpoint.java
#	src/test/groovy/org/prebid/server/functional/testcontainers/container/PrebidServerContainer.groovy
#	src/test/groovy/org/prebid/server/functional/tests/AuctionSpec.groovy
#	src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy
#	src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy
#	src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy
#	src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy
#	src/test/groovy/org/prebid/server/functional/tests/module/pbortb2blocking/PbOrtb2BlockingSpec.groovy
@osulzhenko
osulzhenko force-pushed the functional-tests/extend-endpoints branch from fe300c1 to d2fc71e Compare July 24, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Functional or other tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants