Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test execution requires root #5

Open
Ghaadyy opened this issue Nov 26, 2024 · 1 comment
Open

Test execution requires root #5

Ghaadyy opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Ghaadyy
Copy link
Owner

Ghaadyy commented Nov 26, 2024

The Problem

In the current implementation, the entire API should be executed as root (sudo dotnet run). This is because we are creating a process that installs npm dependencies for the test to execute.

// install npm dependencies
var npmInstallInfo = new ProcessStartInfo {
FileName = "npm",
Arguments = "install websocket selenium-webdriver",
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = Path.GetDirectoryName(tempFilePath),
};

The dependencies are namely, websocket and selenium-webdriver.

This is required because we need to ensure these libraries are present before the script starts executing. Root privilege is required since we are trying to write to a temporary file location.

@Ghaadyy Ghaadyy added the bug Something isn't working label Nov 26, 2024
@Ghaadyy Ghaadyy self-assigned this Nov 26, 2024
@Ghaadyy
Copy link
Owner Author

Ghaadyy commented Dec 27, 2024

This could be handled either by solving #2 or by handling the test execution with containers.

Possible approach

  • Migrate to creating containers on the fly, which will allow us to create an isolated environment for test execution.
  • Create an entire micro-service that handles test execution orchestration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant