-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3c5f87
commit b36ced3
Showing
13 changed files
with
161 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
.../test/java/bio/terra/workspace/app/controller/ControlledGcpResourceApiControllerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...terra/workspace/app/controller/ReferencedGcpResourceControllerBqDatasetConnectedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...o/terra/workspace/app/controller/ReferencedGcpResourceControllerBqTableConnectedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...terra/workspace/app/controller/ReferencedGcpResourceControllerGcsBucketConnectedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...terra/workspace/app/controller/ReferencedGcpResourceControllerGcsObjectConnectedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
service/src/test/java/bio/terra/workspace/common/utils/MockGcpApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package bio.terra.workspace.common.utils; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class MockGcpApi extends MockMvcUtils { | ||
|
||
// GCS Bucket | ||
|
||
public static final String GET_REFERENCED_GCP_GCS_BUCKET_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/buckets/%s"; | ||
public static final String CLONE_CONTROLLED_GCP_GCS_BUCKET_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/buckets/%s/clone"; | ||
public static final String CLONE_RESULT_CONTROLLED_GCP_GCS_BUCKET_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/buckets/clone-result/%s"; | ||
public static final String GENERATE_GCP_GCS_BUCKET_NAME_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/buckets/generateName"; | ||
public static final String CONTROLLED_GCP_GCS_BUCKETS_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/buckets"; | ||
public static final String CONTROLLED_GCP_GCS_BUCKET_V1_PATH_FORMAT = // todo-dex | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/buckets/%s"; | ||
public static final String REFERENCED_GCP_GCS_BUCKETS_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/buckets"; | ||
public static final String LOAD_SIGNED_URL_LIST_PATH_FORMAT = | ||
"/api/workspaces/alpha1/%s/resources/controlled/gcp/buckets/%s/load"; | ||
public static final String LOAD_SIGNED_URL_LIST_RESULT_PATH_FORMAT = | ||
"/api/workspaces/alpha1/%s/resources/controlled/gcp/buckets/%s/load/result/%s"; | ||
public static final String REFERENCED_GCP_GCS_BUCKET_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/buckets/%s"; | ||
public static final String CLONE_REFERENCED_GCP_GCS_BUCKET_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/buckets/%s/clone"; | ||
|
||
// GCS Object | ||
|
||
public static final String REFERENCED_GCP_GCS_OBJECTS_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bucket/objects"; | ||
public static final String REFERENCED_GCP_GCS_OBJECT_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bucket/objects/%s"; | ||
public static final String CLONE_REFERENCED_GCP_GCS_OBJECT_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bucket/objects/%s/clone"; | ||
|
||
// Big Query | ||
|
||
public static final String CONTROLLED_GCP_BIG_QUERY_DATASETS_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/bqdatasets"; | ||
public static final String CONTROLLED_GCP_BIG_QUERY_DATASET_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/bqdatasets/%s"; | ||
public static final String CLONE_CONTROLLED_GCP_BIG_QUERY_DATASET_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/bqdatasets/%s/clone"; | ||
public static final String CLONE_RESULT_CONTROLLED_GCP_BIG_QUERY_DATASET_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/bqdatasets/clone-result/%s"; | ||
|
||
// BQ Dataset | ||
|
||
public static final String GENERATE_GCP_BQ_DATASET_NAME_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/bqdatasets/generateName"; | ||
public static final String REFERENCED_GCP_BIG_QUERY_DATASETS_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bigquerydatasets"; | ||
public static final String REFERENCED_GCP_BIG_QUERY_DATASET_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bigquerydatasets/%s"; | ||
public static final String CLONE_REFERENCED_GCP_BIG_QUERY_DATASET_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bigquerydatasets/%s/clone"; | ||
|
||
// BQ Datatable | ||
|
||
public static final String REFERENCED_GCP_BIG_QUERY_DATA_TABLES_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bigquerydatatables"; | ||
public static final String REFERENCED_GCP_BIG_QUERY_DATA_TABLE_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bigquerydatatables/%s"; | ||
public static final String CLONE_REFERENCED_GCP_BIG_QUERY_DATA_TABLE_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/referenced/gcp/bigquerydatatables/%s/clone"; | ||
|
||
// AI Notebook | ||
|
||
public static final String GENERATE_GCP_AI_NOTEBOOK_NAME_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/ai-notebook-instances/generateName"; | ||
public static final String CONTROLLED_GCP_AI_NOTEBOOKS_V1_PATH_FORMAT = // TODO-dex | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/ai-notebook-instances"; | ||
public static final String CONTROLLED_GCP_AI_NOTEBOOK_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/ai-notebook-instances/%s"; | ||
public static final String CONTROLLED_GCP_AI_NOTEBOOKS_V1_RESULT_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/ai-notebook-instances/create-result/%s"; | ||
|
||
// GCE Instance | ||
|
||
public static final String GENERATE_GCP_GCE_INSTANCE_NAME_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/gce-instances/generateName"; | ||
public static final String CONTROLLED_GCP_GCE_INSTANCES_V1_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/gce-instances"; | ||
public static final String CONTROLLED_GCP_GCE_INSTANCE_V1_PATH_FORMAT = // TODO-dex | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/gce-instances/%s"; | ||
public static final String CONTROLLED_GCP_GCE_INSTANCES_V1_RESULT_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/gce-instances/create-result/%s"; | ||
|
||
// DataProc Cluster | ||
|
||
public static final String GENERATE_GCP_DATAPROC_CLUSTER_NAME_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/dataproc-clusters/generateName"; | ||
public static final String CONTROLLED_GCP_DATAPROC_CLUSTERS_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/dataproc-clusters"; | ||
public static final String CONTROLLED_GCP_DATAPROC_CLUSTER_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/dataproc-clusters/%s"; | ||
public static final String CONTROLLED_GCP_DATAPROC_CLUSTERS_RESULT_PATH_FORMAT = | ||
"/api/workspaces/v1/%s/resources/controlled/gcp/dataproc-clusters/create-result/%s"; | ||
} |
Oops, something went wrong.