Skip to content

Commit

Permalink
Add alpha message and remove missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
azaslavsky committed Apr 26, 2024
1 parent 70fcba1 commit 4b6f380
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
4 changes: 4 additions & 0 deletions src/sentry/runner/commands/workstations.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ def workstations():
"""
Create a bespoke Google Cloud Workstation instance.
NOTE: THIS IS CURRENTLY AN ALPHA STAGE COMMAND! If you are a Sentry dev, you'll need explicit
permissions from the OSPO team to spin up a workstation. Please reach out to us on
#discuss-self-hosted - we'd be happy to get you set up! :)
This command is primarily intended for Sentry employees working on self-hosted. The
`workstations` command requires that the `gcloud` command line utility be installed and visible
from its `$PATH`.
Expand Down
19 changes: 1 addition & 18 deletions tests/sentry/runner/commands/test_workstations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
from dataclasses import dataclass
from unittest.mock import MagicMock, Mock, patch

from sentry.runner.commands.workstations import (
ERR_BIN_NOT_FOUND,
ERR_LOGGED_OUT,
ERR_TIMEOUT,
workstations,
)
from sentry.runner.commands.workstations import ERR_BIN_NOT_FOUND, workstations
from sentry.testutils.cases import CliTestCase

FAKE_GCLOUD_ERROR = "Fake gcloud error"
Expand Down Expand Up @@ -79,18 +74,6 @@ def test_bad_missing_binary(self, _: FakePopen, which_mock: Mock) -> None:
assert rv.exit_code == 1
assert rv.output.strip() == ERR_BIN_NOT_FOUND.strip()

def test_bad_timeout(self, popen_mock: FakePopen, _: Mock) -> None:
popen_mock.wait.side_effect = [raise_timeout]
rv = self.invoke()
assert rv.exit_code == 3
assert rv.output.strip() == ERR_TIMEOUT.strip()

def test_bad_logged_out(self, popen_mock: FakePopen, _: Mock) -> None:
popen_mock.wait.side_effect = [raise_error(ERR_LOGGED_OUT)]
rv = self.invoke()
assert rv.exit_code == 3
assert rv.output.strip() == ERR_LOGGED_OUT.substitute(e=FAKE_GCLOUD_ERROR).strip()


@patch("shutil.which", return_value="/fake/path/to/gcloud/bin")
@patch(
Expand Down

0 comments on commit 4b6f380

Please sign in to comment.