Skip to content

Commit

Permalink
Release v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
operate-services-sdk-bot committed Feb 29, 2024
1 parent f61ff3a commit 304da13
Show file tree
Hide file tree
Showing 216 changed files with 9,190 additions and 1,181 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ All notable changes to UGS CLI will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.3.0] - 2024-02-29
### Added
- Added new service module Scheduler
- `new-file` for deployment
- `list` to see live schedules
- Added support for support [Scheduler service](https://docs.unity.com/ugs/en-us/manual/cloud-code/manual/triggers#Scheduler) to Deploy and Fetch
- Added fetch for [Triggers](https://docs.unity.com/ugs/en-us/manual/cloud-code/manual/triggers)
- Added `--readiness` option to gsh build configuration create command
- Added `--readiness` option to gsh build configuration update command
- Added Game Server Hosting `core-dump` command to configure an external storage location for core dumps (GCS only)
- Added `--build-version-name` option to gsh build create/create-version commands

### Fixed
- Fixed New-file command error for directory that is not exist.
- Deploy no longer requires permissions for services not being deployed, unless reconcile is specified
- Fixed Economy fetch issue making it not idempotent.
- Fixed issue where issues after loading were not reported when deploying CloudCode modules
- Fixed issue where deploying a solution as Cloud Code Module will be logged with the solution path and not the generated ccm

### Changed
- Improved the error description when failing to deploy a solution with no clear main entry project, for Cloud Code Modules deployment.

## [1.2.0] - 2023-11-14

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void Test_Orders_ofComplexitx()
var table = ar.ToTable();
foreach (var (actual,expected) in table.Result.Zip(expectedTable))
{
Assert.That(actual.Name, Is.EqualTo(expected.Name));;
Assert.That(actual.Name, Is.EqualTo(expected.Name));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Unity.Services.Cli.ServiceAccountAuthentication;
using Unity.Services.Cli.ServiceAccountAuthentication.Token;
using Unity.Services.Gateway.AccessApiV1.Generated.Api;
using Unity.Services.Gateway.AccessApiV1.Generated.Client;
using Unity.Services.Gateway.AccessApiV1.Generated.Model;

namespace Unity.Services.Cli.Access.UnitTest.Service;
Expand Down Expand Up @@ -88,6 +89,17 @@ public async Task GetPolicy_Valid()
Times.Once);
}

[Test]
public void GetPolicy_Invalid_ApiThrowsError()
{
m_ProjectPolicyApi.Setup(a => a.GetPolicyAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), CancellationToken.None))
.Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.GetPolicyAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId,
CancellationToken.None));
}

[Test]
public async Task GetPlayerPolicy_Valid()
{
Expand All @@ -104,6 +116,17 @@ public async Task GetPlayerPolicy_Valid()
Times.Once);
}

[Test]
public void GetPlayerPolicy_Invalid_ApiThrowsError()
{
m_PlayerPolicyApi.Setup(a => a.GetPlayerPolicyAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), CancellationToken.None))
.Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.GetPlayerPolicyAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId, TestValues.ValidPlayerId,
CancellationToken.None));
}

[Test]
public async Task GetAllPlayerPolicies_Valid()
{
Expand All @@ -125,6 +148,17 @@ public async Task GetAllPlayerPolicies_Valid()
Times.Once);
}

[Test]
public void GetAllPlayerPolicies_Invalid_ApiThrowsError()
{
m_PlayerPolicyApi.Setup(a => a.GetAllPlayerPoliciesAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(),
It.IsAny<string>(), It.IsAny<int>(), CancellationToken.None)).Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.GetAllPlayerPoliciesAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId,
CancellationToken.None));
}

[Test]
public async Task UpsertPolicyAsync_Valid()
{
Expand All @@ -147,6 +181,17 @@ public async Task UpsertPolicyAsync_Valid()
Times.Once);
}

[Test]
public void UpsertPolicyAsync_Invalid_ApiThrowsError()
{
m_ProjectPolicyApi.Setup(a => a.UpsertPolicyAsync(It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<Policy>(), It.IsAny<int>(), CancellationToken.None)).Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.UpsertPolicyAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId, m_PolicyFile!,
CancellationToken.None));
}

[Test]
public void UpsertPolicyAsync_InvalidInput()
{
Expand Down Expand Up @@ -182,6 +227,17 @@ public async Task UpsertPlayerPolicyAsync_Valid()
Times.Once);
}

[Test]
public void UpsertPlayerPolicyAsync_Invalid_ApiThrowsError()
{
m_PlayerPolicyApi.Setup(a => a.UpsertPlayerPolicyAsync(It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<string>(), It.IsAny<Policy>(), It.IsAny<int>(), CancellationToken.None)).Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.UpsertPlayerPolicyAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId, TestValues.ValidPlayerId,
m_PolicyFile!, CancellationToken.None));
}

[Test]
public void UpsertPlayerPolicyAsync_InvalidInput()
{
Expand Down Expand Up @@ -215,6 +271,17 @@ public async Task DeletePolicyStatementsAsync_Valid()
Times.Once);
}

[Test]
public void DeletePolicyStatementsAsync_Invalid_ApiThrowsError()
{
m_ProjectPolicyApi.Setup(a => a.DeletePolicyStatementsAsync(It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<DeleteOptions>(), It.IsAny<int>(), CancellationToken.None)).Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.DeletePolicyStatementsAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId,
m_PolicyFile!, CancellationToken.None));
}

[Test]
public void DeletePolicyStatementsAsync_InvalidInput()
{
Expand All @@ -229,7 +296,8 @@ public void DeletePolicyStatementsAsync_InvalidInput()
[Test]
public async Task DeletePlayerPolicyStatementsAsync_Valid()
{
m_PlayerPolicyApi.Setup(a => a.DeletePlayerPolicyStatementsAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<DeleteOptions>(), It.IsAny<int>(), CancellationToken.None));
m_PlayerPolicyApi.Setup(a => a.DeletePlayerPolicyStatementsAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<DeleteOptions>(), It.IsAny<int>(), CancellationToken.None));

await m_AccessService!.DeletePlayerPolicyStatementsAsync(
TestValues.ValidProjectId,
Expand All @@ -249,6 +317,17 @@ public async Task DeletePlayerPolicyStatementsAsync_Valid()
Times.Once);
}

[Test]
public void DeletePlayerPolicyStatementsAsync_Invalid_ApiThrowsError()
{
m_PlayerPolicyApi.Setup(a => a.DeletePlayerPolicyStatementsAsync(It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<string>(), It.IsAny<DeleteOptions>(), It.IsAny<int>(), CancellationToken.None)).Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.DeletePlayerPolicyStatementsAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId, TestValues.ValidPlayerId,
m_PolicyFile!, CancellationToken.None));
}

[Test]
public void DeletePlayerPolicyStatementsAsync_InvalidInput()
{
Expand Down Expand Up @@ -284,6 +363,17 @@ public async Task UpsertProjectAccessCaCAsync_Valid()
Times.Once);
}

[Test]
public void UpsertProjectAccessCaCAsync_Invalid_ApiThrowsError()
{
m_ProjectPolicyApi.Setup(a => a.UpsertPolicyAsync(It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<Policy>(), It.IsAny<int>(), CancellationToken.None)).Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.UpsertProjectAccessCaCAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId, It.IsAny<Policy>(),
CancellationToken.None));
}

[Test]
public async Task DeleteProjectAccessCaCAsync_Valid()
{
Expand All @@ -302,4 +392,15 @@ public async Task DeleteProjectAccessCaCAsync_Valid()
It.IsAny<CancellationToken>()),
Times.Once);
}

[Test]
public void DeleteProjectAccessCaCAsync_Invalid_ApiThrowsError()
{
m_ProjectPolicyApi.Setup(a => a.DeletePolicyStatementsAsync(It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<DeleteOptions>(), It.IsAny<int>(), CancellationToken.None)).Throws<ApiException>();

Assert.ThrowsAsync<CliException>(
() => m_AccessService!.DeleteProjectAccessCaCAsync(TestValues.ValidProjectId, TestValues.ValidEnvironmentId, It.IsAny<DeleteOptions>(),
CancellationToken.None));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public AccessDeploymentResult(
{
}

public override TableContent ToTable()
public override TableContent ToTable(string service = "")
{
return AccessControlResToTable(this);
}
Expand Down Expand Up @@ -79,7 +79,7 @@ public AccessFetchResult(
{
}

public override TableContent ToTable()
public override TableContent ToTable(string service)
{
return AccessDeploymentResult.AccessControlResToTable(this);
}
Expand Down
Loading

0 comments on commit 304da13

Please sign in to comment.