Skip to content

Commit

Permalink
tests: use tigther storcon scopes (#9696)
Browse files Browse the repository at this point in the history
## Problem

#9596 did not update tests
because that would've broken the compat tests.

## Summary of Changes

Use infra scope where possible.
  • Loading branch information
VladLazar authored Nov 8, 2024
1 parent f561cbe commit 30680d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions test_runner/fixtures/auth_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ class TokenScope(str, Enum):
SAFEKEEPER_DATA = "safekeeperdata"
TENANT = "tenant"
SCRUBBER = "scrubber"
INFRA = "infra"
12 changes: 6 additions & 6 deletions test_runner/fixtures/neon_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1782,38 +1782,38 @@ def node_drain(self, node_id):
self.request(
"PUT",
f"{self.api}/control/v1/node/{node_id}/drain",
headers=self.headers(TokenScope.ADMIN),
headers=self.headers(TokenScope.INFRA),
)

def cancel_node_drain(self, node_id):
log.info(f"cancel_node_drain({node_id})")
self.request(
"DELETE",
f"{self.api}/control/v1/node/{node_id}/drain",
headers=self.headers(TokenScope.ADMIN),
headers=self.headers(TokenScope.INFRA),
)

def node_fill(self, node_id):
log.info(f"node_fill({node_id})")
self.request(
"PUT",
f"{self.api}/control/v1/node/{node_id}/fill",
headers=self.headers(TokenScope.ADMIN),
headers=self.headers(TokenScope.INFRA),
)

def cancel_node_fill(self, node_id):
log.info(f"cancel_node_fill({node_id})")
self.request(
"DELETE",
f"{self.api}/control/v1/node/{node_id}/fill",
headers=self.headers(TokenScope.ADMIN),
headers=self.headers(TokenScope.INFRA),
)

def node_status(self, node_id):
response = self.request(
"GET",
f"{self.api}/control/v1/node/{node_id}",
headers=self.headers(TokenScope.ADMIN),
headers=self.headers(TokenScope.INFRA),
)
return response.json()

Expand All @@ -1829,7 +1829,7 @@ def node_list(self):
response = self.request(
"GET",
f"{self.api}/control/v1/node",
headers=self.headers(TokenScope.ADMIN),
headers=self.headers(TokenScope.INFRA),
)
return response.json()

Expand Down

1 comment on commit 30680d1

@github-actions
Copy link

Choose a reason for hiding this comment

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

5346 tests run: 5123 passed, 1 failed, 222 skipped (full report)


Failures on Postgres 16

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_physical_and_logical_replication[release-pg16]"
Flaky tests (1)

Postgres 17

Test coverage report is not available

The comment gets automatically updated with the latest test results
30680d1 at 2024-11-08T18:02:50.743Z :recycle:

Please sign in to comment.