Fix log return disposed obj (#705)
* generator not to dispose stream * new generated code * test to cover log stream
This commit is contained in:
@@ -466,7 +466,7 @@ namespace k8s
|
|||||||
}
|
}
|
||||||
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
|
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
|
||||||
}
|
}
|
||||||
{{/IfReturnType operation "stream"}}
|
{{/IfReturnType operation "obj"}}
|
||||||
}
|
}
|
||||||
{{/IfReturnType operation "any"}}
|
{{/IfReturnType operation "any"}}
|
||||||
if (_shouldTrace)
|
if (_shouldTrace)
|
||||||
|
|||||||
@@ -64,6 +64,17 @@ namespace k8s
|
|||||||
{{/operation.parameters}}
|
{{/operation.parameters}}
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
|
{{#IfReturnType operation "stream"}}
|
||||||
|
var _result = await operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
|
||||||
|
{{#operation.parameters}}
|
||||||
|
{{GetDotNetName .}},
|
||||||
|
{{/operation.parameters}}
|
||||||
|
null,
|
||||||
|
cancellationToken);
|
||||||
|
_result.Request.Dispose();
|
||||||
|
{{GetReturnType operation "_result.Body"}};
|
||||||
|
{{/IfReturnType operation "stream"}}
|
||||||
|
{{#IfReturnType operation "obj"}}
|
||||||
using (var _result = await operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
|
using (var _result = await operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
|
||||||
{{#operation.parameters}}
|
{{#operation.parameters}}
|
||||||
{{GetDotNetName .}},
|
{{GetDotNetName .}},
|
||||||
@@ -73,6 +84,17 @@ namespace k8s
|
|||||||
{
|
{
|
||||||
{{GetReturnType operation "_result.Body"}};
|
{{GetReturnType operation "_result.Body"}};
|
||||||
}
|
}
|
||||||
|
{{/IfReturnType operation "obj"}}
|
||||||
|
{{#IfReturnType operation "void"}}
|
||||||
|
using (var _result = await operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
|
||||||
|
{{#operation.parameters}}
|
||||||
|
{{GetDotNetName .}},
|
||||||
|
{{/operation.parameters}}
|
||||||
|
null,
|
||||||
|
cancellationToken).ConfigureAwait(false))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
{{/IfReturnType operation "void"}}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/.}}
|
{{/.}}
|
||||||
|
|||||||
@@ -956,7 +956,7 @@ namespace KubernetesWatchGenerator
|
|||||||
{
|
{
|
||||||
fn(null);
|
fn(null);
|
||||||
}
|
}
|
||||||
else if (type == "stream" && rt == "Stream")
|
else if (type.ToLower() == rt.ToLower())
|
||||||
{
|
{
|
||||||
fn(null);
|
fn(null);
|
||||||
}
|
}
|
||||||
|
|||||||
389
src/KubernetesClient/generated/KubernetesExtensions.cs
generated
389
src/KubernetesClient/generated/KubernetesExtensions.cs
generated
@@ -12671,7 +12671,7 @@ namespace k8s
|
|||||||
bool? tty = null,
|
bool? tty = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNamespacedPodAttachWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNamespacedPodAttachWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
container,
|
container,
|
||||||
@@ -12680,10 +12680,9 @@ namespace k8s
|
|||||||
stdout,
|
stdout,
|
||||||
tty,
|
tty,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -12789,7 +12788,7 @@ namespace k8s
|
|||||||
bool? tty = null,
|
bool? tty = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNamespacedPodAttachWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNamespacedPodAttachWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
container,
|
container,
|
||||||
@@ -12798,10 +12797,9 @@ namespace k8s
|
|||||||
stdout,
|
stdout,
|
||||||
tty,
|
tty,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13418,7 +13416,7 @@ namespace k8s
|
|||||||
bool? tty = null,
|
bool? tty = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNamespacedPodExecWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNamespacedPodExecWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
command,
|
command,
|
||||||
@@ -13428,10 +13426,9 @@ namespace k8s
|
|||||||
stdout,
|
stdout,
|
||||||
tty,
|
tty,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13540,7 +13537,7 @@ namespace k8s
|
|||||||
bool? tty = null,
|
bool? tty = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNamespacedPodExecWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNamespacedPodExecWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
command,
|
command,
|
||||||
@@ -13550,10 +13547,9 @@ namespace k8s
|
|||||||
stdout,
|
stdout,
|
||||||
tty,
|
tty,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13713,7 +13709,7 @@ namespace k8s
|
|||||||
bool? timestamps = null,
|
bool? timestamps = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ReadNamespacedPodLogWithHttpMessagesAsync(
|
var _result = await operations.ReadNamespacedPodLogWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
container,
|
container,
|
||||||
@@ -13726,10 +13722,9 @@ namespace k8s
|
|||||||
tailLines,
|
tailLines,
|
||||||
timestamps,
|
timestamps,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13787,15 +13782,14 @@ namespace k8s
|
|||||||
int? ports = null,
|
int? ports = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNamespacedPodPortforwardWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNamespacedPodPortforwardWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
ports,
|
ports,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13853,15 +13847,14 @@ namespace k8s
|
|||||||
int? ports = null,
|
int? ports = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNamespacedPodPortforwardWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNamespacedPodPortforwardWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
ports,
|
ports,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13919,15 +13912,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectDeleteNamespacedPodProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectDeleteNamespacedPodProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13985,15 +13977,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNamespacedPodProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNamespacedPodProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14051,15 +14042,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectHeadNamespacedPodProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectHeadNamespacedPodProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14117,15 +14107,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPatchNamespacedPodProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPatchNamespacedPodProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14183,15 +14172,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNamespacedPodProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNamespacedPodProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14249,15 +14237,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPutNamespacedPodProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPutNamespacedPodProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14324,16 +14311,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectDeleteNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectDeleteNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14400,16 +14386,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14476,16 +14461,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectHeadNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectHeadNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14552,16 +14536,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPatchNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPatchNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14628,16 +14611,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -14704,16 +14686,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPutNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPutNamespacedPodProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22341,15 +22322,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectDeleteNamespacedServiceProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectDeleteNamespacedServiceProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22415,15 +22395,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNamespacedServiceProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNamespacedServiceProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22489,15 +22468,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectHeadNamespacedServiceProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectHeadNamespacedServiceProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22563,15 +22541,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPatchNamespacedServiceProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPatchNamespacedServiceProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22637,15 +22614,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNamespacedServiceProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNamespacedServiceProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22711,15 +22687,14 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPutNamespacedServiceProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPutNamespacedServiceProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22794,16 +22769,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectDeleteNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectDeleteNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22878,16 +22852,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22962,16 +22935,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectHeadNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectHeadNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -23046,16 +23018,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPatchNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPatchNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -23130,16 +23101,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -23214,16 +23184,15 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPutNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPutNamespacedServiceProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
namespaceParameter,
|
namespaceParameter,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25358,14 +25327,13 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectDeleteNodeProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectDeleteNodeProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25414,14 +25382,13 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNodeProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNodeProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25470,14 +25437,13 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectHeadNodeProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectHeadNodeProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25526,14 +25492,13 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPatchNodeProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPatchNodeProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25582,14 +25547,13 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNodeProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNodeProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25638,14 +25602,13 @@ namespace k8s
|
|||||||
string path = null,
|
string path = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPutNodeProxyWithHttpMessagesAsync(
|
var _result = await operations.ConnectPutNodeProxyWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25703,15 +25666,14 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectDeleteNodeProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectDeleteNodeProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25769,15 +25731,14 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectGetNodeProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectGetNodeProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25835,15 +25796,14 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectHeadNodeProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectHeadNodeProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25901,15 +25861,14 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPatchNodeProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPatchNodeProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -25967,15 +25926,14 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPostNodeProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPostNodeProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -26033,15 +25991,14 @@ namespace k8s
|
|||||||
string path1 = null,
|
string path1 = null,
|
||||||
CancellationToken cancellationToken = default(CancellationToken))
|
CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
using (var _result = await operations.ConnectPutNodeProxyWithPathWithHttpMessagesAsync(
|
var _result = await operations.ConnectPutNodeProxyWithPathWithHttpMessagesAsync(
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
path1,
|
path1,
|
||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken);
|
||||||
{
|
_result.Request.Dispose();
|
||||||
return _result.Body;
|
return _result.Body;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -94394,7 +94351,6 @@ namespace k8s
|
|||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94440,7 +94396,6 @@ namespace k8s
|
|||||||
null,
|
null,
|
||||||
cancellationToken).ConfigureAwait(false))
|
cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -28,9 +29,19 @@ namespace k8s.E2E
|
|||||||
void Cleanup()
|
void Cleanup()
|
||||||
{
|
{
|
||||||
var pods = client.ListNamespacedPod(namespaceParameter);
|
var pods = client.ListNamespacedPod(namespaceParameter);
|
||||||
if (pods.Items.Any(p => p.Metadata.Name == podName))
|
while (pods.Items.Any(p => p.Metadata.Name == podName))
|
||||||
{
|
{
|
||||||
client.DeleteNamespacedPod(podName, namespaceParameter);
|
try
|
||||||
|
{
|
||||||
|
client.DeleteNamespacedPod(podName, namespaceParameter);
|
||||||
|
}
|
||||||
|
catch (HttpOperationException e)
|
||||||
|
{
|
||||||
|
if (e.Response.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,6 +337,105 @@ namespace k8s.E2E
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MinikubeFact]
|
||||||
|
public async Task LogStreamTestAsync()
|
||||||
|
{
|
||||||
|
var namespaceParameter = "default";
|
||||||
|
var podName = "k8scsharp-e2e-logstream-pod";
|
||||||
|
|
||||||
|
var client = CreateClient();
|
||||||
|
|
||||||
|
void Cleanup()
|
||||||
|
{
|
||||||
|
var pods = client.ListNamespacedPod(namespaceParameter);
|
||||||
|
while (pods.Items.Any(p => p.Metadata.Name == podName))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
client.DeleteNamespacedPod(podName, namespaceParameter);
|
||||||
|
}
|
||||||
|
catch (HttpOperationException e)
|
||||||
|
{
|
||||||
|
if (e.Response.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Cleanup();
|
||||||
|
|
||||||
|
client.CreateNamespacedPod(
|
||||||
|
new V1Pod()
|
||||||
|
{
|
||||||
|
Metadata = new V1ObjectMeta { Name = podName, },
|
||||||
|
Spec = new V1PodSpec
|
||||||
|
{
|
||||||
|
Containers = new[]
|
||||||
|
{
|
||||||
|
new V1Container()
|
||||||
|
{
|
||||||
|
Name = "k8scsharp-e2e-logstream",
|
||||||
|
Image = "busybox",
|
||||||
|
Command = new[] { "ping" },
|
||||||
|
Args = new[] { "-i", "10", "127.0.0.1" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
namespaceParameter);
|
||||||
|
|
||||||
|
var lines = new List<string>();
|
||||||
|
var started = new ManualResetEvent(false);
|
||||||
|
|
||||||
|
async Task<V1Pod> Pod()
|
||||||
|
{
|
||||||
|
var pods = client.ListNamespacedPod(namespaceParameter);
|
||||||
|
var pod = pods.Items.First();
|
||||||
|
while (pod.Status.Phase != "Running")
|
||||||
|
{
|
||||||
|
await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
|
||||||
|
return await Pod().ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pod;
|
||||||
|
}
|
||||||
|
|
||||||
|
var pod = await Pod().ConfigureAwait(false);
|
||||||
|
var stream = client.ReadNamespacedPodLog(pod.Metadata.Name, pod.Metadata.NamespaceProperty, follow: true);
|
||||||
|
using var reader = new StreamReader(stream);
|
||||||
|
|
||||||
|
var copytask = Task.Run(() =>
|
||||||
|
{
|
||||||
|
for (; ; )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lines.Add(reader.ReadLine());
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
started.Set();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Assert.True(started.WaitOne(TimeSpan.FromMinutes(2)));
|
||||||
|
await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
|
||||||
|
Assert.Null(copytask.Exception);
|
||||||
|
Assert.Equal(2, lines.Count);
|
||||||
|
await Task.Delay(TimeSpan.FromSeconds(11)).ConfigureAwait(false);
|
||||||
|
Assert.Equal(3, lines.Count);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Cleanup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[MinikubeFact]
|
[MinikubeFact]
|
||||||
public async Task DatetimeFieldTest()
|
public async Task DatetimeFieldTest()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user