Skip to content

Commit

Permalink
Update api version of test files
Browse files Browse the repository at this point in the history
  • Loading branch information
shunki-fujita committed Oct 29, 2024
1 parent ca41d2d commit 7a78259
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions api/krusty/namespaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ metadata:
`)

th.WriteF("clusterrolebinding.yaml", `
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
Expand All @@ -781,7 +781,7 @@ resources:

m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: iter8-prometheus
Expand Down
10 changes: 5 additions & 5 deletions api/krusty/openapicustomschema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func TestCustomOpenApiFieldBothPathAndVersion(t *testing.T) {
resources:
- mycrd.yaml
openapi:
version: v1.21.2
version: v1.30.4
path: mycrd_schema.json
`+customSchemaPatch)
writeCustomResource(th, "mycrd.yaml")
Expand Down Expand Up @@ -399,7 +399,7 @@ openapi:
resources:
- ../base
openapi:
version: v1.21.2
version: v1.30.4
`+customSchemaPatch)
writeCustomResource(th, "base/mycrd.yaml")
writeTestSchema(th, "base/")
Expand All @@ -416,7 +416,7 @@ spec:
- image: nginx
name: server
`)
assert.Equal(t, "v1.21.2", openapi.GetSchemaVersion())
assert.Equal(t, "v1.30.4", openapi.GetSchemaVersion())
})
}

Expand Down Expand Up @@ -547,7 +547,7 @@ func TestCustomOpenApiFieldVersion(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK(".", `
openapi:
version: v1.21.2
version: v1.30.4
resources:
- deployment.yaml
`)
Expand Down Expand Up @@ -575,7 +575,7 @@ spec:
containers:
- image: whatever
`)
assert.Equal(t, "v1.21.2", openapi.GetSchemaVersion())
assert.Equal(t, "v1.30.4", openapi.GetSchemaVersion())
})
}

Expand Down
9 changes: 6 additions & 3 deletions api/krusty/remoteloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ cp -r testdata/remoteload/simple $ROOT/simple.git
(
cd $ROOT/simple.git
git config --global protocol.file.allow always
git init --initial-branch=main
git init
git checkout -b main
git add .
git commit -m "import"
git checkout -b change-image
Expand All @@ -89,15 +90,17 @@ cp -r $ROOT/simple.git $ROOT/nosuffix
cp -r testdata/remoteload/multibase $ROOT/multibase.git
(
cd $ROOT/multibase.git
git init --initial-branch=main
git init
git checkout -b main
git add .
git commit -m "import"
)
cp -r testdata/remoteload/with-submodule $ROOT/with-submodule.git # see README
cp -r $ROOT/simple.git/. $ROOT/$HASH_DIR
(
cd $ROOT/with-submodule.git
git init --initial-branch=main
git init
git checkout -b main
git add .
git commit -m "import"
git checkout -b relative-submodule
Expand Down

0 comments on commit 7a78259

Please sign in to comment.