Skip to content

Commit 6eb4191

Browse files
authored
Merge pull request #62 from renoki-co/update/v1.20
[update] v1.20
2 parents 16ce51d + ee136a3 commit 6eb4191

File tree

4 files changed

+6
-51
lines changed

4 files changed

+6
-51
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
- '7.4'
2323
- '8.0'
2424
kubernetes:
25-
- '1.17.17'
2625
- '1.18.15'
2726
- '1.19.7'
27+
- '1.20.2'
2828
laravel:
2929
- 7.*
3030
- 8.*
@@ -55,10 +55,10 @@ jobs:
5555
path: ~/.composer/cache/files
5656
key: composer-php-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.prefer }}-${{ hashFiles('composer.json') }}
5757

58-
- uses: manusa/actions-setup-minikube@v2.2.0
58+
- uses: manusa/actions-setup-minikube@v2.3.0
5959
name: Setup Minikube
6060
with:
61-
minikube version: v1.14.2
61+
minikube version: v1.17.0
6262
kubernetes version: "v${{ matrix.kubernetes }}"
6363
github token: "${{ secrets.GITHUB_TOKEN }}"
6464

tests/IngressTest.php

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,11 @@ class IngressTest extends TestCase
2222
'serviceName' => 'nginx',
2323
'servicePort' => 80,
2424
],
25+
'pathType' => 'ImplementationSpecific',
2526
]],
2627
],
2728
]];
2829

29-
public function setUp(): void
30-
{
31-
parent::setUp();
32-
33-
// >= v1.18.0: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
34-
if ($this->cluster->newerThan('1.18.0')) {
35-
self::$rules[0]['http']['paths'][0]['pathType'] = 'ImplementationSpecific';
36-
}
37-
}
38-
3930
public function test_ingress_build()
4031
{
4132
$ing = $this->cluster->ingress()
@@ -52,28 +43,9 @@ public function test_ingress_build()
5243
$this->assertEquals(self::$rules, $ing->getRules());
5344
}
5445

55-
public function test_ingress_from_yaml_pre_1_18_0()
56-
{
57-
if ($this->cluster->newerThan('1.18.0')) {
58-
$this->markTestSkipped('The current tested version is newer than 1.18.0');
59-
}
60-
61-
$ing = $this->cluster->fromYamlFile(__DIR__.'/yaml/ingress_pre_1.18.0.yaml');
62-
63-
$this->assertEquals('networking.k8s.io/v1beta1', $ing->getApiVersion());
64-
$this->assertEquals('nginx', $ing->getName());
65-
$this->assertEquals(['tier' => 'backend'], $ing->getLabels());
66-
$this->assertEquals(['nginx/ann' => 'yes'], $ing->getAnnotations());
67-
$this->assertEquals(self::$rules, $ing->getRules());
68-
}
69-
70-
public function test_ingress_from_yaml_post_1_18_0()
46+
public function test_ingress_from_yaml_post()
7147
{
72-
if ($this->cluster->olderThan('1.18.0')) {
73-
$this->markTestSkipped('The current tested version is older than 1.18.0');
74-
}
75-
76-
$ing = $this->cluster->fromYamlFile(__DIR__.'/yaml/ingress_post_1.18.0.yaml');
48+
$ing = $this->cluster->fromYamlFile(__DIR__.'/yaml/ingress.yaml');
7749

7850
$this->assertEquals('networking.k8s.io/v1beta1', $ing->getApiVersion());
7951
$this->assertEquals('nginx', $ing->getName());
File renamed without changes.

tests/yaml/ingress_pre_1.18.0.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)