mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Use regexp instead of specifing uid.
This commit is contained in:
parent
f9a6445ea9
commit
93d5528507
@ -190,8 +190,7 @@ var _ = framework.KubeDescribe("Downward API", func() {
|
|||||||
|
|
||||||
It("should provide pod UID as env vars [Conformance]", func() {
|
It("should provide pod UID as env vars [Conformance]", func() {
|
||||||
framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
|
framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
|
||||||
podUID := uuid.NewUUID()
|
podName := "downward-api-" + string(uuid.NewUUID())
|
||||||
podName := "downward-api-" + string(podUID)
|
|
||||||
env := []v1.EnvVar{
|
env := []v1.EnvVar{
|
||||||
{
|
{
|
||||||
Name: "POD_UID",
|
Name: "POD_UID",
|
||||||
@ -205,7 +204,7 @@ var _ = framework.KubeDescribe("Downward API", func() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expectations := []string{
|
expectations := []string{
|
||||||
fmt.Sprintf("POD_UID=%v", podUID),
|
fmt.Sprintf("POD_UID=[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),
|
||||||
}
|
}
|
||||||
|
|
||||||
testDownwardAPI(f, podName, env, expectations)
|
testDownwardAPI(f, podName, env, expectations)
|
||||||
|
Loading…
Reference in New Issue
Block a user