Skip to content

Conversation

@wanlin31
Copy link
Collaborator

@wanlin31 wanlin31 commented Aug 19, 2025

This PR introduces an install.py script to automate the download, verification, and installation of the test-server binary from its GitHub Releases page.

Tested:

python3 -m venv ~/env
source ~/env/bin/activate

python install.py

Output:

Downloading test-server_Linux_x86_64.tar.gz from https://github.com/google/test-server/releases/download/v0.2.6/test-server_Linux_x86_64.tar.gz...
Download complete.
Verifying checksum...
Checksum verified successfully.
Extracting binary from /usr/local/google/home/wanlindu/test-server/sdks/python/bin/test-server_Linux_x86_64.tar.gz to /usr/local/google/home/wanlindu/test-server/sdks/python/bin...
/usr/local/google/home/wanlindu/test-server/sdks/python/install.py:117: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
  tar_ref.extractall(BIN_DIR)
Extraction complete.
Cleaned up /usr/local/google/home/wanlindu/test-server/sdks/python/bin/test-server_Linux_x86_64.tar.gz.
Set executable permission for /usr/local/google/home/wanlindu/test-server/sdks/python/bin/test-server
test-server binary is ready at /usr/local/google/home/wanlindu/test-server/sdks/python/bin/test-server

The try to run the binary:

./usr/local/google/home/wanlindu/test-server/sdks/python/bin/test-server

Output

Test-server allows recording requests and responses made to
a server and then replay the recorded sequenced as part of text fixtures.

Usage:
  test-server [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  record      Run test-server in record mode
  replay      Replay recorded HTTP responses

Flags:
      --config string   config file (default is ./test-server.yaml)
  -h, --help            help for test-server

Use "test-server [command] --help" for more information about a command.

This PR introduces an install.py script to automate the download,
verification, and installation of the test-server binary from
its GitHub Releases page.
@wanlin31 wanlin31 requested review from Annhiluc and hkt74 August 19, 2025 23:41
Copy link
Collaborator

@Annhiluc Annhiluc left a comment

Choose a reason for hiding this comment

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

Wondering, how was this tested/verified?

import requests

# --- Configuration ---
TEST_SERVER_VERSION = "v0.2.6"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update to latest?

@wanlin31
Copy link
Collaborator Author

Wondering, how was this tested/verified?

Thank you for helping me take a look at the PR, updated in the PR description.
The results only shows that the binary is executable, I have tried e2e for in github.com//pull/34 with a sample like what typescript did.

@wanlin31 wanlin31 requested a review from Annhiluc August 22, 2025 22:35
@wanlin31 wanlin31 merged commit 963208c into google:main Aug 25, 2025
2 checks passed
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