Skip to content

Create a simple_cloud fixture#371

Merged
torcolvin merged 1 commit into
mainfrom
prototype-single-cloud-fixture
Mar 12, 2026
Merged

Create a simple_cloud fixture#371
torcolvin merged 1 commit into
mainfrom
prototype-single-cloud-fixture

Conversation

@torcolvin

@torcolvin torcolvin commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

In order to implement rosmar support into the e2e framework, it makes logical sense that couchbase_servers is nil. However, all tests that use configure_dataset require a CouchbaseCloud instance.

This PR only creates a simple_cloud convenience function to allow for a future rosmar upgrade, for all tests that can be run without an actual Couchbase Server instance (most of them).

@borrrden

borrrden commented Mar 5, 2026

Copy link
Copy Markdown
Member

Is the goal here to be able to run all existing tests with rosmar? Because otherwise I think if you write a new test there is no requirement to use the cloud class. That class was there specifically because setting things up between server and sync gateway is finicky and messy. For rosmar you can just skip straight to SGW db PUT right?

@torcolvin

Copy link
Copy Markdown
Collaborator Author

Is the goal here to be able to run all existing tests with rosmar? Because otherwise I think if you write a new test there is no requirement to use the cloud class. That class was there specifically because setting things up between server and sync gateway is finicky and messy. For rosmar you can just skip straight to SGW db PUT right?

The goal is to run all the existing tests, the tests all run OK except those that really require a server (XDCR). If you'd rather that I do something hackier like putting:

  "couchbase-servers": [
    {
      "hostname": "fakelocalhost",
      "rosmar": true
    }
  ],

I can do that to make sure that it doesn't accidentally try to contact a couchbase server that might exist and thus not work correctly.

To me, these fixtures reduce LOC and complexity but I can understand why this isn't always that way.

Another way of thing about this instead of a fixture like this would be to replace the cloud fixture with a method on CBLPyTest.cloud(self) that does the same work as the test fixture.

I can infer rosmarness by asking Sync Gateway, so technically this doesn't even need to be present in the configuration file at all.

@borrrden

Copy link
Copy Markdown
Member

If you are ready for this to be reviewed let me know again because the checks are failing

@torcolvin

Copy link
Copy Markdown
Collaborator Author

I put this up as an idea of what to do. The code that can go into production is in #375

I mostly want to know if you think this makes things better (or worse).

@torcolvin torcolvin changed the title prototype fixture for single cloud, testserver instances Create a simple_cloud fixture Mar 11, 2026
@torcolvin torcolvin force-pushed the prototype-single-cloud-fixture branch 2 times, most recently from 75f765c to fb0a6c8 Compare March 11, 2026 23:37
@torcolvin torcolvin force-pushed the prototype-single-cloud-fixture branch from fb0a6c8 to 6dd8299 Compare March 11, 2026 23:38
Comment thread tests/dev_e2e/test_fest.py
Comment thread tests/dev_e2e/test_fest.py
@torcolvin torcolvin merged commit 3a94bc9 into main Mar 12, 2026
4 checks passed
@torcolvin torcolvin deleted the prototype-single-cloud-fixture branch March 12, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants