tests/testthat/test_workspaces_api.R

# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate

context("Test WorkspacesApi")

api.instance <- WorkspacesApi$new()

test_that("BrowserDownloadAttributes", {
  # tests for BrowserDownloadAttributes
  # base path: http://localhost
  # TSV file containing workspace attributes (allows cookie-based authentication) 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [data.frame]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("ChangedWorkspaceNotification", {
  # tests for ChangedWorkspaceNotification
  # base path: http://localhost
  # Sends notifications for change to workspace
  # @param workspace.namespace character workspace namespace
  # @param workspace.name character workspace name
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("CheckIamActionWithLock", {
  # tests for CheckIamActionWithLock
  # base path: http://localhost
  # Check IAM action with lock
  # Check to see if the user has the given action on a workspace in Sam. Takes into account if the workspace is locked too.
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param sam.action.name character Sam action
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("CloneWorkspace", {
  # tests for CloneWorkspace
  # base path: http://localhost
  # Clone Workspace
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param workspace WorkspaceRequestClone Cloned workspace information
  # @return [WorkspaceDetails]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("CreateWorkspace", {
  # tests for CreateWorkspace
  # base path: http://localhost
  # Create workspace
  # @param workspace WorkspaceRequest New workspace information
  # @return [WorkspaceDetails]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("DeleteWorkspace", {
  # tests for DeleteWorkspace
  # base path: http://localhost
  # Delete workspace
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("DeleteWorkspaceTags", {
  # tests for DeleteWorkspaceTags
  # base path: http://localhost
  # Remove the user-supplied tags from the workspace. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param tags array[character] List of tags.
  # @return [array[character]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("ExportAttributesTSV", {
  # tests for ExportAttributesTSV
  # base path: http://localhost
  # TSV file containing workspace attributes 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [data.frame]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetBucketUsage", {
  # tests for GetBucketUsage
  # base path: http://localhost
  # Get bucket usage
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetCatalog", {
  # tests for GetCatalog
  # base path: http://localhost
  # Get workspace catalog permission
  # Get catalog permissions for a workspace
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [array[WorkspaceCatalog]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetStorageCostEstimate", {
  # tests for GetStorageCostEstimate
  # base path: http://localhost
  # Calculate an estimate of the monthly storage cost for the workspace bucket
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetTags", {
  # tests for GetTags
  # base path: http://localhost
  # Get all tags used in FireCloud (for autocomplete) 
  # list of all tags used in FireCloud and their associated frequencies
  # @param q character Query string (optional)
  # @return [array[WorkspaceTag]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetWorkspace", {
  # tests for GetWorkspace
  # base path: http://localhost
  # Get workspace
  # Get a single workspace&#39;s details, optionally filtered to only the specified fields. See additional GET methods in this section to retrieve additional details about the workspace. For instance, this API only returns the workspace&#39;s owners; use the GET .../acl method to retrieve the full list of all users at all permission levels. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param fields array[character] When specified, include only these keys in the response payload and exclude other keys. Accepts a comma-delimited list of values. To include a nested key, specify the key's path using a dot delimiter; for example, to include {\"workspace\": {\"attributes\": {}}}, specify \"workspace.attributes\". Legal values are any first-level key in the response, any first-level key inside the {\"workspace\": {}} object, and any first-level key inside the {\"workspace\": {\"attributes\": {}}} object. If omitted, will return the full response payload.  (optional)
  # @return [WorkspaceResponse]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetWorkspaceAccessInstructions", {
  # tests for GetWorkspaceAccessInstructions
  # base path: http://localhost
  # Get workspace access instructions (if any)
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [array[ManagedGroupAccessInstructions]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetWorkspaceAcl", {
  # tests for GetWorkspaceAcl
  # base path: http://localhost
  # Get workspace ACL
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [WorkspaceACL]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetWorkspaceBucketOptions", {
  # tests for GetWorkspaceBucketOptions
  # base path: http://localhost
  # Get metadata about the workspace bucket
  # Returns metadata about the workspace bucket.
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [WorkspaceBucketOptions]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("GetWorkspaceTags", {
  # tests for GetWorkspaceTags
  # base path: http://localhost
  # Get the tags for this workspace. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [array[character]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("ImportAttributesTSV", {
  # tests for ImportAttributesTSV
  # base path: http://localhost
  # Import workspace attributes from a tsv file
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param attributes data.frame A valid TSV import file
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("ListWorkspaceMethodConfigs", {
  # tests for ListWorkspaceMethodConfigs
  # base path: http://localhost
  # List method configurations in a workspace
  # List method configurations in a workspace. By default, only Agora method configs are returned. To return configs for all repos, specify &#x60;allRepos&#x60; to be &#x60;true&#x60;.  #### Expanded discussion on the methodRepoMethod field  This endpoint returns method references to Agora in the format &#x60;&#x60;&#x60; \&quot;methodRepoMethod\&quot;: {   \&quot;methodNamespace\&quot;: \&quot;namespace\&quot;,   \&quot;methodName\&quot;: \&quot;name\&quot;,   \&quot;methodVersion\&quot;: 1,   \&quot;sourceRepo\&quot;: \&quot;agora\&quot;,   \&quot;methodUri\&quot;: \&quot;agora://namespace/name/1\&quot; } &#x60;&#x60;&#x60; and for Dockstore in the format &#x60;&#x60;&#x60; \&quot;methodRepoMethod\&quot;: {   \&quot;methodPath\&quot;: \&quot;path\&quot;,   \&quot;methodVersion\&quot;: \&quot;version\&quot;,   \&quot;sourceRepo\&quot;: \&quot;agora\&quot;,   \&quot;methodUri\&quot;: \&quot;dockstore://path/version\&quot; } &#x60;&#x60;&#x60; If you are only working with Agora methods, the fields &#x60;\&quot;sourceRepo\&quot;&#x60; and &#x60;\&quot;methodUri\&quot;&#x60; can be considered informational and do not need to be round-tripped (see the corresponding &#x60;POST /api/workspaces/{workspaceNamespace}/{workspaceName}/methodconfigs&#x60; for more details). 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param all.repos character Configs for all repos, not just Agora (optional)
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("ListWorkspaces", {
  # tests for ListWorkspaces
  # base path: http://localhost
  # Lists workspaces. 
  # @param fields array[character] When specified, include only these keys in the response payload and exclude other keys. Accepts a comma-delimited list of values. To include a nested key, specify the key's path using a dot delimiter; for example, to include {\"workspace\": {\"attributes\": {}}}, specify \"workspace.attributes\". Legal values are any first-level key in the response, any first-level key inside the {\"workspace\": {}} object, and any first-level key inside the {\"workspace\": {\"attributes\": {}}} object. If omitted, will return the full response payload.  (optional)
  # @return [array[WorkspaceListResponse]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("LockWorkspace", {
  # tests for LockWorkspace
  # base path: http://localhost
  # Lock Workspace
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("PatchWorkspaceTags", {
  # tests for PatchWorkspaceTags
  # base path: http://localhost
  # Add tags to the workspace without modifying pre-existing tags. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param tags array[character] List of tags.
  # @return [array[character]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("PostWorkspaceMethodConfig", {
  # tests for PostWorkspaceMethodConfig
  # base path: http://localhost
  # Create a Method Configuration in a workspace
  # Create method configurations. #### Expanded discussion on the methodRepoMethod field To create a method config for an Agora method, &#x60;\&quot;sourceRepo\&quot;: \&quot;agora\&quot;&#x60; is optional; the following is sufficient: &#x60;&#x60;&#x60; \&quot;methodRepoMethod\&quot;: {   \&quot;methodNamespace\&quot;: \&quot;namespace\&quot;,   \&quot;methodName\&quot;: \&quot;name\&quot;,   \&quot;methodVersion\&quot;: 1 } &#x60;&#x60;&#x60; To create a method config for a Dockstore method, &#x60;\&quot;sourceRepo\&quot;: \&quot;dockstore\&quot;&#x60; is required: &#x60;&#x60;&#x60; \&quot;methodRepoMethod\&quot;: {   \&quot;sourceRepo\&quot;: \&quot;dockstore\&quot;,   \&quot;methodPath\&quot;: \&quot;path\&quot;,   \&quot;methodVersion\&quot;: \&quot;version\&quot; } &#x60;&#x60;&#x60; You may also use the URI on its own to create a config referencing any supported repo (currently Agora and Dockstore): &#x60;&#x60;&#x60; \&quot;methodRepoMethod\&quot;: {   \&quot;methodUri\&quot;: \&quot;agora://namespace/name/1\&quot; } &#x60;&#x60;&#x60; &#x60;&#x60;&#x60; \&quot;methodRepoMethod\&quot;: {   \&quot;methodUri\&quot;: \&quot;dockstore://path/version\&quot; } &#x60;&#x60;&#x60; The system is specified to check for a URI first before falling back to the legacy fields. Unsupported repos will return a 400 Bad Request. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param method.config.json NewMethodConfigIngest Method Configuration contents
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("PutWorkspaceTags", {
  # tests for PutWorkspaceTags
  # base path: http://localhost
  # Replace all tags for this workspace with the user input. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param tags array[character] List of tags.
  # @return [array[character]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("ReadBucket", {
  # tests for ReadBucket
  # base path: http://localhost
  # Read workspace bucket
  # Read a workspace bucket
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SetAttributes", {
  # tests for SetAttributes
  # base path: http://localhost
  # Set attributes on a workspace. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param new.attributes map(object) New attribute values, as Map[String, Attribute]. WARNING! This should not be used to change library metadata (republish will not happen). Use UpdateAttributes in the library section
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("UnlockWorkspace", {
  # tests for UnlockWorkspace
  # base path: http://localhost
  # Unlock Workspace
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @return [Void]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("UpdateAttributes", {
  # tests for UpdateAttributes
  # base path: http://localhost
  # Modify attributes on a workspace. 
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param workspace.update.json array[AttributeUpdateOperation] Attribute operations. WARNING! This should not be used to change library metadata (republish will not happen). Use UpdateAttributes in the library section.
  # @return [WorkspaceDetails]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("UpdateCatalog", {
  # tests for UpdateCatalog
  # base path: http://localhost
  # Update catalog permission
  # Set catalog permisisons for a workspace
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param catalog.updates array[WorkspaceCatalog] Series of Catalog updates for workspace
  # @return [WorkspaceCatalogUpdateResponseList]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("UpdateWorkspaceACL", {
  # tests for UpdateWorkspaceACL
  # base path: http://localhost
  # Update workspace ACL
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param invite.users.not.found character true to invite unregistered users, false to ignore
  # @param acl.updates array[WorkspaceACLUpdate] Series of ACL updates for workspace
  # @return [WorkspaceACLUpdateResponseList]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("WorkspacePermissionReport", {
  # tests for WorkspacePermissionReport
  # base path: http://localhost
  # Retrieve user permissions for the workspace and the workspace&#39;s method references
  # @param workspace.namespace character Workspace Namespace
  # @param workspace.name character Workspace Name
  # @param report.input PermissionReportRequest Users and/or configs on which to report, both optional
  # @return [PermissionReport]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})
vjcitn/terraClientR documentation built on Dec. 23, 2021, 4:07 p.m.