diff --git a/.azure/build.yml b/.azure/build.yml
new file mode 100644
index 00000000..6779f719
--- /dev/null
+++ b/.azure/build.yml
@@ -0,0 +1,11 @@
+parameters:
+ netcore1Global: true
+
+steps:
+- task: DotNetCoreCLI@2
+ displayName: dotnet build
+ inputs:
+ command: build
+ projects: progaudi.tarantool.sln
+ arguments: -c Release
+ verbosityRestore: minimal
diff --git a/.azure/tests.yml b/.azure/tests.yml
index 41508c17..058959b9 100644
--- a/.azure/tests.yml
+++ b/.azure/tests.yml
@@ -2,29 +2,6 @@ parameters:
netcore1Global: true
steps:
-- task: DotNetCoreCLI@2
- displayName: dotnet build
- inputs:
- command: build
- projects: progaudi.tarantool.sln
- arguments: -c Release
- verbosityRestore: minimal
-
-- task: Bash@3
- displayName: set version variable
- inputs:
- targetType: inline
- script: echo "##vso[task.setvariable variable=NugetPackageVersion]$(git describe --tags | sed 's/-/./')"
-
-- task: DotNetCoreCLI@2
- displayName: pack nuget package
- inputs:
- command: pack
- versioningScheme: byEnvVar
- versionEnvVar: NugetPackageVersion
- arguments: --no-build -c Release /property:PackageOutputPath=$(Build.ArtifactStagingDirectory)
- verbosityPack: minimal
-
- task: Bash@3
inputs:
targetType: inline
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index d7553568..38f422a7 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -3,14 +3,17 @@ jobs:
pool:
name: Hosted macOS
steps:
- - template: .azure/tests.yml
+ - template: .azure/build.yml
- job: linux
pool:
name: Hosted Ubuntu 1604
steps:
+ - template: .azure/build.yml
+
- script: curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -channel 1.1
displayName: Installing .netcore 1.1
+
- template: .azure/tests.yml
parameters:
netcore1Global: false
@@ -22,7 +25,15 @@ jobs:
pool:
name: Hosted VS2017
steps:
- - template: .azure/tests.yml
+ - template: .azure/build.yml
+
+ - task: PowerShell@2
+ displayName: pack nuget package
+ inputs:
+ targetType: inline
+ script: |
+ $version = $(git describe --tags | %{$_ -replace '-([^g])', '.$1'})
+ dotnet pack --no-build -v minimal -c Release /property:Version=$version /property:PackageOutputPath=$(Build.ArtifactStagingDirectory)
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- task: NuGetCommand@2
diff --git a/src/progaudi.tarantool/progaudi.tarantool.csproj b/src/progaudi.tarantool/progaudi.tarantool.csproj
index 2eaa0b7e..214b92dc 100644
--- a/src/progaudi.tarantool/progaudi.tarantool.csproj
+++ b/src/progaudi.tarantool/progaudi.tarantool.csproj
@@ -28,7 +28,7 @@
-
+
diff --git a/tarantool/testdata.lua b/tarantool/testdata.lua
index 6cfcf676..41240b77 100644
--- a/tarantool/testdata.lua
+++ b/tarantool/testdata.lua
@@ -152,7 +152,6 @@ function return_tuple()
return { 1, 2 }
end
-
function return_array()
log.info('return_array called')
return {{ "abc", "def" }}
@@ -167,6 +166,10 @@ function return_nothing()
log.info('return_nothing called')
end
+function replace(t)
+ return box.space.with_scalar_index:replace(t)
+end
+
local truncate_space = function(name)
local space = box.space[name]
diff --git a/tests/progaudi.tarantool.tests/Box/Call_Should.cs b/tests/progaudi.tarantool.tests/Box/Call_Should.cs
index 1ed60829..1a89852c 100644
--- a/tests/progaudi.tarantool.tests/Box/Call_Should.cs
+++ b/tests/progaudi.tarantool.tests/Box/Call_Should.cs
@@ -131,5 +131,22 @@ public async Task return_nothing_should_not_throw()
Should.NotThrow(async () => await tarantoolClient.Call("return_nothing"));
}
}
+
+ [Fact]
+ public async Task replace_via_call()
+ {
+ using (var tarantoolClient = await Client.Box.Connect(ConnectionStringFactory.GetReplicationSource_1_8()))
+ {
+ var tuple = ("123", new byte[] { 1, 2, 3 });
+ var result = await tarantoolClient.Call[], ValueTuple>(
+ "replace",
+ new [] { tuple });
+
+ var firstTuple = result.Data[0];
+
+ tuple.Item1.ShouldBe(firstTuple.Item1);
+ tuple.Item2.ShouldBe(firstTuple.Item2);
+ }
+ }
}
}
\ No newline at end of file