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
a05ede23
Commit
a05ede23
authored
Jul 14, 2018
by
tianshapjq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
should be fmt.printf in the e2e test
parent
614e3add
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
authorizer_util.go
test/e2e/framework/authorizer_util.go
+4
-4
prometheus.go
test/e2e/instrumentation/monitoring/prometheus.go
+2
-2
events.go
test/e2e/node/events.go
+3
-4
No files found.
test/e2e/framework/authorizer_util.go
View file @
a05ede23
...
...
@@ -17,7 +17,7 @@ limitations under the License.
package
framework
import
(
"
fmt
"
"
github.com/golang/glog
"
"sync"
"time"
...
...
@@ -62,7 +62,7 @@ func WaitForNamedAuthorizationUpdate(c v1beta1authorization.SubjectAccessReviews
// GKE doesn't enable the SAR endpoint. Without this endpoint, we cannot determine if the policy engine
// has adjusted as expected. In this case, simply wait one second and hope it's up to date
if
apierrors
.
IsNotFound
(
err
)
{
fmt
.
Printf
(
"SubjectAccessReview endpoint is missing
\n
"
)
glog
.
Info
(
"SubjectAccessReview endpoint is missing
"
)
time
.
Sleep
(
1
*
time
.
Second
)
return
true
,
nil
}
...
...
@@ -94,7 +94,7 @@ func BindClusterRole(c v1beta1rbac.ClusterRoleBindingsGetter, clusterRole, ns st
// if we failed, don't fail the entire test because it may still work. RBAC may simply be disabled.
if
err
!=
nil
{
fmt
.
Print
f
(
"Error binding clusterrole/%s for %q for %v
\n
"
,
clusterRole
,
ns
,
subjects
)
glog
.
Error
f
(
"Error binding clusterrole/%s for %q for %v
\n
"
,
clusterRole
,
ns
,
subjects
)
}
}
...
...
@@ -124,7 +124,7 @@ func bindInNamespace(c v1beta1rbac.RoleBindingsGetter, roleType, role, ns string
// if we failed, don't fail the entire test because it may still work. RBAC may simply be disabled.
if
err
!=
nil
{
fmt
.
Print
f
(
"Error binding %s/%s into %q for %v
\n
"
,
roleType
,
role
,
ns
,
subjects
)
glog
.
Error
f
(
"Error binding %s/%s into %q for %v
\n
"
,
roleType
,
role
,
ns
,
subjects
)
}
}
...
...
test/e2e/instrumentation/monitoring/prometheus.go
View file @
a05ede23
...
...
@@ -238,7 +238,7 @@ func fetchPrometheusTargetDiscovery(c clientset.Interface) (TargetDiscovery, err
Raw
()
var
qres
promTargetsResponse
if
err
!=
nil
{
f
mt
.
Print
f
(
string
(
response
))
f
ramework
.
Log
f
(
string
(
response
))
return
qres
.
Data
,
err
}
err
=
json
.
Unmarshal
(
response
,
&
qres
)
...
...
@@ -297,7 +297,7 @@ func queryPrometheus(c clientset.Interface, query string, start, end time.Time,
Do
()
.
Raw
()
if
err
!=
nil
{
f
mt
.
Print
f
(
string
(
response
))
f
ramework
.
Log
f
(
string
(
response
))
return
nil
,
err
}
var
qres
promQueryResponse
...
...
test/e2e/node/events.go
View file @
a05ede23
...
...
@@ -17,7 +17,6 @@ limitations under the License.
package
node
import
(
"fmt"
"strconv"
"time"
...
...
@@ -84,7 +83,7 @@ var _ = SIGDescribe("Events", func() {
if
err
!=
nil
{
framework
.
Failf
(
"Failed to get pod: %v"
,
err
)
}
f
mt
.
Print
f
(
"%+v
\n
"
,
podWithUid
)
f
ramework
.
Log
f
(
"%+v
\n
"
,
podWithUid
)
var
events
*
v1
.
EventList
// Check for scheduler event about the pod.
By
(
"checking for scheduler event about the pod"
)
...
...
@@ -101,7 +100,7 @@ var _ = SIGDescribe("Events", func() {
return
false
,
err
}
if
len
(
events
.
Items
)
>
0
{
f
mt
.
Println
(
"Saw scheduler event for our pod."
)
f
ramework
.
Logf
(
"Saw scheduler event for our pod."
)
return
true
,
nil
}
return
false
,
nil
...
...
@@ -121,7 +120,7 @@ var _ = SIGDescribe("Events", func() {
return
false
,
err
}
if
len
(
events
.
Items
)
>
0
{
f
mt
.
Println
(
"Saw kubelet event for our pod."
)
f
ramework
.
Logf
(
"Saw kubelet event for our pod."
)
return
true
,
nil
}
return
false
,
nil
...
...
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