Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Nov 22, 2023
1 parent 6f8abdd commit 9e84b3d
Show file tree
Hide file tree
Showing 4 changed files with 339 additions and 8 deletions.
1 change: 0 additions & 1 deletion components/public-api/gitpod/v1/configuration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ service ConfigurationService {
// Updates a configuration.
rpc UpdateConfiguration(UpdateConfigurationRequest) returns (UpdateConfigurationResponse) {}


// Deletes a configuration.
rpc DeleteConfiguration(DeleteConfigurationRequest) returns (DeleteConfigurationResponse) {}
}
Expand Down
15 changes: 8 additions & 7 deletions components/public-api/gitpod/v1/workspace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ service WorkspaceService {
rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) {}

// CreateAndStartWorkspace creates a new workspace and starts it.
rpc CreateAndStartWorkspace(CreateAndStartWorkspaceRequest)
returns (CreateAndStartWorkspaceResponse) {}
rpc CreateAndStartWorkspace(CreateAndStartWorkspaceRequest) returns (CreateAndStartWorkspaceResponse) {}

// StartWorkspace starts an existing workspace.
// If the specified workspace is not in stopped phase, this will return the workspace as is.
Expand Down Expand Up @@ -82,7 +81,6 @@ message ListWorkspacesResponse {
}

message CreateAndStartWorkspaceRequest {

message Git {
// clone_url is the URL of the repository to clone
string clone_url = 1;
Expand All @@ -108,15 +106,14 @@ message CreateAndStartWorkspaceRequest {
//
// +required
oneof source {

// git describes the source refer of workspace
// Obtain available git using the ContextService.ParseContext operation if
// not sure about it.
Git git = 3;

// context_url is for backward compatiblity with the current dashboard, use
// ContextService.ParseContext get get a Git source instead
string context_url = 4 [ deprecated = true ];
string context_url = 4 [deprecated = true];
}

// additional_env_variables provide additional environment variables to the
Expand All @@ -143,7 +140,9 @@ message CreateAndStartWorkspaceRequest {
bool force_default_config = 11;
}

message CreateAndStartWorkspaceResponse { Workspace workspace = 1; }
message CreateAndStartWorkspaceResponse {
Workspace workspace = 1;
}

message StartWorkspaceRequest {
// workspace_id specifies the workspace that is going to start
Expand All @@ -154,7 +153,9 @@ message StartWorkspaceRequest {
bool force_default_config = 2;
}

message StartWorkspaceResponse { Workspace workspace = 1; }
message StartWorkspaceResponse {
Workspace workspace = 1;
}

// +resource get workspace
message Workspace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@ const mockApplyingContainerModule = new ContainerModule((bind, unbound, isbound,
authProviderConfigs: [],
installationShortname: "gitpod",
auth: mockAuthConfig,
prebuildLimiter: {
"*": {
limit: 50,
period: 50,
},
},
});
rebind(IAnalyticsWriter).toConstantValue(NullAnalyticsWriter);
rebind(HostContextProviderFactory)
Expand Down
Loading

0 comments on commit 9e84b3d

Please sign in to comment.