public async Task TestGetKubectlContextForClusterAsync_ThrowsOnCommandFailure() { SetupRunCommandResult(false); GCloudException e = await Assert.ThrowsExceptionAsync <GCloudException>( () => KubectlContext.GetForClusterAsync(ExpectedCluster, DefaultZone)); StringAssert.Contains(e.Message, ExpectedCluster); }
public async Task TestGetKubectlContextForClusterAsync_ThrowsOnCommandFailure(Cluster cluster) { _processServiceMock.SetupRunCommandAsync().ReturnsResult(false); GCloudException e = await Assert.ThrowsExceptionAsync <GCloudException>( () => _objectUnderTest.GetKubectlContextForClusterAsync(cluster)); StringAssert.Contains(e.Message, cluster.Name); }