@@ -619,7 +619,7 @@ async Task Cleanup()
619
619
620
620
// create + list
621
621
{
622
- await clientSet . CoreV1 . Pods . PutAsync (
622
+ await clientSet . CoreV1 . Pods . PostAsync (
623
623
new V1Pod ( )
624
624
{
625
625
Metadata = new V1ObjectMeta { Name = podName , Labels = new Dictionary < string , string > { { "place" , "holder" } , } , } ,
@@ -628,7 +628,6 @@ await clientSet.CoreV1.Pods.PutAsync(
628
628
Containers = new [ ] { new V1Container ( ) { Name = "k8scsharp-e2e" , Image = "nginx" , } , } ,
629
629
} ,
630
630
} ,
631
- podName ,
632
631
namespaceParameter ) . ConfigureAwait ( false ) ;
633
632
634
633
var pods = await clientSet . CoreV1 . Pods . ListAsync ( namespaceParameter ) . ConfigureAwait ( false ) ;
@@ -637,7 +636,7 @@ await clientSet.CoreV1.Pods.PutAsync(
637
636
638
637
// replace + get
639
638
{
640
- var pod = await clientSet . CoreV1 . Pods . GetAsync ( namespaceParameter , podName ) . ConfigureAwait ( false ) ;
639
+ var pod = await clientSet . CoreV1 . Pods . GetAsync ( podName , namespaceParameter ) . ConfigureAwait ( false ) ;
641
640
var old = JsonSerializer . SerializeToDocument ( pod ) ;
642
641
643
642
var newLabels = new Dictionary < string , string > ( pod . Metadata . Labels ) { [ "test" ] = "clinetset-test-jsonpatch" } ;
@@ -646,18 +645,20 @@ await clientSet.CoreV1.Pods.PutAsync(
646
645
var expected = JsonSerializer . SerializeToDocument ( pod ) ;
647
646
var patch = old . CreatePatch ( expected ) ;
648
647
649
- await clientSet . CoreV1 . Pods . PatchAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , namespaceParameter , podName ) . ConfigureAwait ( false ) ;
648
+ await clientSet . CoreV1 . Pods
649
+ . PatchAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , podName , namespaceParameter )
650
+ . ConfigureAwait ( false ) ;
650
651
var pods = await clientSet . CoreV1 . Pods . ListAsync ( namespaceParameter ) . ConfigureAwait ( false ) ;
651
652
Assert . Contains ( pods . Items , p => p . Labels ( ) . Contains ( new KeyValuePair < string , string > ( "test" , "clinetset-test-jsonpatch" ) ) ) ;
652
653
}
653
654
654
655
// replace + get
655
656
{
656
- var pod = await clientSet . CoreV1 . Pods . GetAsync ( namespaceParameter , podName ) . ConfigureAwait ( false ) ;
657
+ var pod = await clientSet . CoreV1 . Pods . GetAsync ( podName , namespaceParameter ) . ConfigureAwait ( false ) ;
657
658
pod . Spec . Containers [ 0 ] . Image = "httpd" ;
658
- await clientSet . CoreV1 . Pods . PutAsync ( pod , namespaceParameter , podName ) . ConfigureAwait ( false ) ;
659
+ await clientSet . CoreV1 . Pods . PutAsync ( pod , podName , namespaceParameter ) . ConfigureAwait ( false ) ;
659
660
660
- pod = await clientSet . CoreV1 . Pods . GetAsync ( namespaceParameter , podName ) . ConfigureAwait ( false ) ;
661
+ pod = await clientSet . CoreV1 . Pods . GetAsync ( podName , namespaceParameter ) . ConfigureAwait ( false ) ;
661
662
Assert . Equal ( "httpd" , pod . Spec . Containers [ 0 ] . Image ) ;
662
663
}
663
664
@@ -669,7 +670,7 @@ await clientSet.CoreV1.Pods.PutAsync(
669
670
{
670
671
try
671
672
{
672
- await clientSet . CoreV1 . Pods . DeleteAsync ( namespaceParameter , podName ) . ConfigureAwait ( false ) ;
673
+ await clientSet . CoreV1 . Pods . DeleteAsync ( podName , namespaceParameter ) . ConfigureAwait ( false ) ;
673
674
}
674
675
catch ( HttpOperationException e )
675
676
{
0 commit comments