Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
7e16583e
Commit
7e16583e
authored
Jun 04, 2015
by
Quinton Hoole
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9301 from caesarxuchao/add-v1-in-e2e
replace v1beta3 with v1 in e2e tests
parents
81eab116
d3664957
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
cadvisor.go
test/e2e/cadvisor.go
+1
-1
downward_api.go
test/e2e/downward_api.go
+2
-2
monitoring.go
test/e2e/monitoring.go
+1
-1
util.go
test/e2e/util.go
+3
-3
volumes.go
test/e2e/volumes.go
+3
-3
No files found.
test/e2e/cadvisor.go
View file @
7e16583e
...
@@ -58,7 +58,7 @@ func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration) {
...
@@ -58,7 +58,7 @@ func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration) {
for
_
,
node
:=
range
nodeList
.
Items
{
for
_
,
node
:=
range
nodeList
.
Items
{
// cadvisor is not accessible directly unless its port (4194 by default) is exposed.
// cadvisor is not accessible directly unless its port (4194 by default) is exposed.
// Here, we access '/stats/' REST endpoint on the kubelet which polls cadvisor internally.
// Here, we access '/stats/' REST endpoint on the kubelet which polls cadvisor internally.
statsResource
:=
fmt
.
Sprintf
(
"api/v1
beta3
/proxy/nodes/%s/stats/"
,
node
.
Name
)
statsResource
:=
fmt
.
Sprintf
(
"api/v1/proxy/nodes/%s/stats/"
,
node
.
Name
)
By
(
fmt
.
Sprintf
(
"Querying stats from node %s using url %s"
,
node
.
Name
,
statsResource
))
By
(
fmt
.
Sprintf
(
"Querying stats from node %s using url %s"
,
node
.
Name
,
statsResource
))
_
,
err
=
c
.
Get
()
.
AbsPath
(
statsResource
)
.
Timeout
(
timeout
)
.
Do
()
.
Raw
()
_
,
err
=
c
.
Get
()
.
AbsPath
(
statsResource
)
.
Timeout
(
timeout
)
.
Do
()
.
Raw
()
if
err
!=
nil
{
if
err
!=
nil
{
...
...
test/e2e/downward_api.go
View file @
7e16583e
...
@@ -67,7 +67,7 @@ var _ = Describe("Downward API", func() {
...
@@ -67,7 +67,7 @@ var _ = Describe("Downward API", func() {
Name
:
"POD_NAME"
,
Name
:
"POD_NAME"
,
ValueFrom
:
&
api
.
EnvVarSource
{
ValueFrom
:
&
api
.
EnvVarSource
{
FieldRef
:
&
api
.
ObjectFieldSelector
{
FieldRef
:
&
api
.
ObjectFieldSelector
{
APIVersion
:
"v1
beta3
"
,
APIVersion
:
"v1"
,
FieldPath
:
"metadata.name"
,
FieldPath
:
"metadata.name"
,
},
},
},
},
...
@@ -76,7 +76,7 @@ var _ = Describe("Downward API", func() {
...
@@ -76,7 +76,7 @@ var _ = Describe("Downward API", func() {
Name
:
"POD_NAMESPACE"
,
Name
:
"POD_NAMESPACE"
,
ValueFrom
:
&
api
.
EnvVarSource
{
ValueFrom
:
&
api
.
EnvVarSource
{
FieldRef
:
&
api
.
ObjectFieldSelector
{
FieldRef
:
&
api
.
ObjectFieldSelector
{
APIVersion
:
"v1
beta3
"
,
APIVersion
:
"v1"
,
FieldPath
:
"metadata.namespace"
,
FieldPath
:
"metadata.namespace"
,
},
},
},
},
...
...
test/e2e/monitoring.go
View file @
7e16583e
...
@@ -208,7 +208,7 @@ func testMonitoringUsingHeapsterInfluxdb(c *client.Client) {
...
@@ -208,7 +208,7 @@ func testMonitoringUsingHeapsterInfluxdb(c *client.Client) {
if
!
ok
{
if
!
ok
{
Failf
(
"failed to get master http client"
)
Failf
(
"failed to get master http client"
)
}
}
proxyUrl
:=
fmt
.
Sprintf
(
"%s/api/v1
beta3
/proxy/namespaces/default/services/%s:api/"
,
getMasterHost
(),
influxdbService
)
proxyUrl
:=
fmt
.
Sprintf
(
"%s/api/v1/proxy/namespaces/default/services/%s:api/"
,
getMasterHost
(),
influxdbService
)
config
:=
&
influxdb
.
ClientConfig
{
config
:=
&
influxdb
.
ClientConfig
{
Host
:
proxyUrl
,
Host
:
proxyUrl
,
// TODO(vishh): Infer username and pw from the Pod spec.
// TODO(vishh): Infer username and pw from the Pod spec.
...
...
test/e2e/util.go
View file @
7e16583e
...
@@ -501,7 +501,7 @@ func validateController(c *client.Client, containerImage string, replicas int, c
...
@@ -501,7 +501,7 @@ func validateController(c *client.Client, containerImage string, replicas int, c
By
(
fmt
.
Sprintf
(
"waiting for all containers in %s pods to come up."
,
testname
))
//testname should be selector
By
(
fmt
.
Sprintf
(
"waiting for all containers in %s pods to come up."
,
testname
))
//testname should be selector
for
start
:=
time
.
Now
();
time
.
Since
(
start
)
<
podStartTimeout
;
time
.
Sleep
(
5
*
time
.
Second
)
{
for
start
:=
time
.
Now
();
time
.
Since
(
start
)
<
podStartTimeout
;
time
.
Sleep
(
5
*
time
.
Second
)
{
getPodsOutput
:=
runKubectl
(
"get"
,
"pods"
,
"-o"
,
"template"
,
getPodsTemplate
,
"--api-version=v1
beta3
"
,
"-l"
,
testname
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
))
getPodsOutput
:=
runKubectl
(
"get"
,
"pods"
,
"-o"
,
"template"
,
getPodsTemplate
,
"--api-version=v1"
,
"-l"
,
testname
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
))
pods
:=
strings
.
Fields
(
getPodsOutput
)
pods
:=
strings
.
Fields
(
getPodsOutput
)
if
numPods
:=
len
(
pods
);
numPods
!=
replicas
{
if
numPods
:=
len
(
pods
);
numPods
!=
replicas
{
By
(
fmt
.
Sprintf
(
"Replicas for %s: expected=%d actual=%d"
,
testname
,
replicas
,
numPods
))
By
(
fmt
.
Sprintf
(
"Replicas for %s: expected=%d actual=%d"
,
testname
,
replicas
,
numPods
))
...
@@ -509,13 +509,13 @@ func validateController(c *client.Client, containerImage string, replicas int, c
...
@@ -509,13 +509,13 @@ func validateController(c *client.Client, containerImage string, replicas int, c
}
}
var
runningPods
[]
string
var
runningPods
[]
string
for
_
,
podID
:=
range
pods
{
for
_
,
podID
:=
range
pods
{
running
:=
runKubectl
(
"get"
,
"pods"
,
podID
,
"-o"
,
"template"
,
getContainerStateTemplate
,
"--api-version=v1
beta3
"
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
))
running
:=
runKubectl
(
"get"
,
"pods"
,
podID
,
"-o"
,
"template"
,
getContainerStateTemplate
,
"--api-version=v1"
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
))
if
running
!=
"true"
{
if
running
!=
"true"
{
Logf
(
"%s is created but not running"
,
podID
)
Logf
(
"%s is created but not running"
,
podID
)
continue
continue
}
}
currentImage
:=
runKubectl
(
"get"
,
"pods"
,
podID
,
"-o"
,
"template"
,
getImageTemplate
,
"--api-version=v1
beta3
"
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
))
currentImage
:=
runKubectl
(
"get"
,
"pods"
,
podID
,
"-o"
,
"template"
,
getImageTemplate
,
"--api-version=v1"
,
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
))
if
currentImage
!=
containerImage
{
if
currentImage
!=
containerImage
{
Logf
(
"%s is created but running wrong image; expected: %s, actual: %s"
,
podID
,
containerImage
,
currentImage
)
Logf
(
"%s is created but running wrong image; expected: %s, actual: %s"
,
podID
,
containerImage
,
currentImage
)
continue
continue
...
...
test/e2e/volumes.go
View file @
7e16583e
...
@@ -79,7 +79,7 @@ func startVolumeServer(client *client.Client, config VolumeTestConfig) *api.Pod
...
@@ -79,7 +79,7 @@ func startVolumeServer(client *client.Client, config VolumeTestConfig) *api.Pod
serverPod
:=
&
api
.
Pod
{
serverPod
:=
&
api
.
Pod
{
TypeMeta
:
api
.
TypeMeta
{
TypeMeta
:
api
.
TypeMeta
{
Kind
:
"Pod"
,
Kind
:
"Pod"
,
APIVersion
:
"v1
beta3
"
,
APIVersion
:
"v1"
,
},
},
ObjectMeta
:
api
.
ObjectMeta
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
config
.
prefix
+
"-server"
,
Name
:
config
.
prefix
+
"-server"
,
...
@@ -137,7 +137,7 @@ func testVolumeClient(client *client.Client, config VolumeTestConfig, volume api
...
@@ -137,7 +137,7 @@ func testVolumeClient(client *client.Client, config VolumeTestConfig, volume api
clientPod
:=
&
api
.
Pod
{
clientPod
:=
&
api
.
Pod
{
TypeMeta
:
api
.
TypeMeta
{
TypeMeta
:
api
.
TypeMeta
{
Kind
:
"Pod"
,
Kind
:
"Pod"
,
APIVersion
:
"v1
beta3
"
,
APIVersion
:
"v1"
,
},
},
ObjectMeta
:
api
.
ObjectMeta
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
config
.
prefix
+
"-client"
,
Name
:
config
.
prefix
+
"-client"
,
...
@@ -282,7 +282,7 @@ var _ = Describe("Volumes", func() {
...
@@ -282,7 +282,7 @@ var _ = Describe("Volumes", func() {
endpoints
:=
api
.
Endpoints
{
endpoints
:=
api
.
Endpoints
{
TypeMeta
:
api
.
TypeMeta
{
TypeMeta
:
api
.
TypeMeta
{
Kind
:
"Endpoints"
,
Kind
:
"Endpoints"
,
APIVersion
:
"v1
beta3
"
,
APIVersion
:
"v1"
,
},
},
ObjectMeta
:
api
.
ObjectMeta
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
config
.
prefix
+
"-server"
,
Name
:
config
.
prefix
+
"-server"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment