Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,9 @@ def _create_storage_account(self):
@ResourceGroupPreparer(name_prefix='synapse-cli', random_name_length=16)
def test_linked_service(self):
self.kwargs.update({
'name': 'linkedservice'})
'name': 'linkedservice',
'file': os.path.join(os.path.join(os.path.dirname(__file__), 'assets'), 'linkedservice.json')
})

# create a workspace
self._create_workspace()
Expand All @@ -892,7 +894,7 @@ def test_linked_service(self):

# create linked service
self.cmd(
'az synapse linked-service create --workspace-name {workspace} --name {name} --file @src/azure-cli/azure/cli/command_modules/synapse/tests/latest/assets/linkedservice.json',
'az synapse linked-service create --workspace-name {workspace} --name {name} --file @"{file}"',
checks=[
self.check('name', self.kwargs['name'])
])
Expand Down Expand Up @@ -972,11 +974,13 @@ def test_dataset(self):
def test_pipeline(self):
self.kwargs.update({
'workspace': 'testsynapseworkspace',
'name': 'pipeline'})
'name': 'pipeline',
'file': os.path.join(os.path.join(os.path.dirname(__file__), 'assets'), 'pipeline.json')
})

# create pipeline
self.cmd(
'az synapse pipeline create --workspace-name {workspace} --name {name} --file @src/azure-cli/azure/cli/command_modules/synapse/tests/latest/assets/pipeline.json',
'az synapse pipeline create --workspace-name {workspace} --name {name} --file @"{file}"',
checks=[
self.check('name', self.kwargs['name'])
])
Expand Down Expand Up @@ -1037,11 +1041,13 @@ def test_trigger(self):
'name': 'trigger',
'event-trigger': 'EventTrigger',
'tumbling-window-trigger': 'TumblingWindowTrigger',
'run-id': '08586024051698130326966471413CU40'})
'run-id': '08586024051698130326966471413CU40',
'file': os.path.join(os.path.join(os.path.dirname(__file__), 'assets'), 'trigger.json')
})

# create trigger
self.cmd(
'az synapse trigger create --workspace-name {workspace} --name {name} --file @src/azure-cli/azure/cli/command_modules/synapse/tests/latest/assets/trigger.json',
'az synapse trigger create --workspace-name {workspace} --name {name} --file @"{file}"',
checks=[
self.check('name', self.kwargs['name'])
])
Expand Down Expand Up @@ -1112,11 +1118,13 @@ def test_trigger(self):
def test_data_flow(self):
self.kwargs.update({
'workspace': 'testsynapseworkspace',
'name': 'dataflow'})
'name': 'dataflow',
'file': os.path.join(os.path.join(os.path.dirname(__file__), 'assets'), 'dataflow.json')
})

# create data flow
self.cmd(
'az synapse data-flow create --workspace-name {workspace} --name {name} --file @src/azure-cli/azure/cli/command_modules/synapse/tests/latest/assets/dataflow.json',
'az synapse data-flow create --workspace-name {workspace} --name {name} --file @"{file}"',
checks=[
self.check('name', self.kwargs['name'])
])
Expand Down Expand Up @@ -1147,11 +1155,13 @@ def test_notebook(self):
self.kwargs.update({
'workspace': 'testsynapseworkspace',
'name': 'notebook',
'spark-pool': 'testpool'})
'spark-pool': 'testpool',
'file': os.path.join(os.path.join(os.path.dirname(__file__), 'assets'), 'notebook.ipynb')
})

# create notebook
self.cmd(
'az synapse notebook create --workspace-name {workspace} --name {name} --file @src/azure-cli/azure/cli/command_modules/synapse/tests/latest/assets/notebook.ipynb '
'az synapse notebook create --workspace-name {workspace} --name {name} --file @"{file}" '
'--spark-pool-name {spark-pool}',
checks=[
self.check('name', self.kwargs['name'])
Expand Down