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
89c8949e
Commit
89c8949e
authored
Jun 02, 2015
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add v1 to hack/test-integration.sh
parent
48d3d604
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
1 deletion
+42
-1
integration.go
cmd/integration/integration.go
+1
-0
test-integration.sh
hack/test-integration.sh
+2
-1
conversion.go
pkg/api/v1/conversion.go
+26
-0
auth_test.go
test/integration/auth_test.go
+8
-0
master_utils.go
test/integration/framework/master_utils.go
+1
-0
scheduler_test.go
test/integration/scheduler_test.go
+1
-0
secret_test.go
test/integration/secret_test.go
+1
-0
service_account_test.go
test/integration/service_account_test.go
+1
-0
utils.go
test/integration/utils.go
+1
-0
No files found.
cmd/integration/integration.go
View file @
89c8949e
...
...
@@ -165,6 +165,7 @@ func startComponents(firstManifestURL, secondManifestURL, apiVersion string) (st
ReadOnlyPort
:
portNumber
,
PublicAddress
:
publicAddress
,
CacheTimeout
:
2
*
time
.
Second
,
EnableV1
:
true
,
})
handler
.
delegate
=
m
.
Handler
...
...
hack/test-integration.sh
View file @
89c8949e
...
...
@@ -25,7 +25,8 @@ set -o pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
# Comma separated list of API Versions that should be tested.
KUBE_TEST_API_VERSIONS
=
${
KUBE_TEST_API_VERSIONS
:-
"v1beta3"
}
KUBE_TEST_API_VERSIONS
=
${
KUBE_TEST_API_VERSIONS
:-
"v1beta3,v1"
}
KUBE_INTEGRATION_TEST_MAX_CONCURRENCY
=
${
KUBE_INTEGRATION_TEST_MAX_CONCURRENCY
:-
"-1"
}
LOG_LEVEL
=
${
LOG_LEVEL
:-
2
}
...
...
pkg/api/v1/conversion.go
View file @
89c8949e
...
...
@@ -117,6 +117,32 @@ func addConversionFuncs() {
// If one of the conversion functions is malformed, detect it immediately.
panic
(
err
)
}
err
=
api
.
Scheme
.
AddFieldLabelConversionFunc
(
"v1"
,
"Secret"
,
func
(
label
,
value
string
)
(
string
,
string
,
error
)
{
switch
label
{
case
"type"
:
return
label
,
value
,
nil
default
:
return
""
,
""
,
fmt
.
Errorf
(
"field label not supported: %s"
,
label
)
}
})
if
err
!=
nil
{
// If one of the conversion functions is malformed, detect it immediately.
panic
(
err
)
}
err
=
api
.
Scheme
.
AddFieldLabelConversionFunc
(
"v1"
,
"ServiceAccount"
,
func
(
label
,
value
string
)
(
string
,
string
,
error
)
{
switch
label
{
case
"metadata.name"
:
return
label
,
value
,
nil
default
:
return
""
,
""
,
fmt
.
Errorf
(
"field label not supported: %s"
,
label
)
}
})
if
err
!=
nil
{
// If one of the conversion functions is malformed, detect it immediately.
panic
(
err
)
}
}
func
convert_v1_StatusDetails_To_api_StatusDetails
(
in
*
StatusDetails
,
out
*
api
.
StatusDetails
,
s
conversion
.
Scope
)
error
{
...
...
test/integration/auth_test.go
View file @
89c8949e
...
...
@@ -397,6 +397,7 @@ func TestAuthModeAlwaysAllow(t *testing.T) {
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
transport
:=
http
.
DefaultTransport
...
...
@@ -537,6 +538,7 @@ func TestAuthModeAlwaysDeny(t *testing.T) {
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysDenyAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
transport
:=
http
.
DefaultTransport
...
...
@@ -605,6 +607,7 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
allowAliceAuthorizer
{},
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
...
...
@@ -692,6 +695,7 @@ func TestBobIsForbidden(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
allowAliceAuthorizer
{},
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
transport
:=
http
.
DefaultTransport
...
...
@@ -753,6 +757,7 @@ func TestUnknownUserIsUnauthorized(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
allowAliceAuthorizer
{},
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
transport
:=
http
.
DefaultTransport
...
...
@@ -833,6 +838,7 @@ func TestNamespaceAuthorization(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
a
,
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
...
...
@@ -948,6 +954,7 @@ func TestKindAuthorization(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
a
,
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
previousResourceVersion
:=
make
(
map
[
string
]
float64
)
...
...
@@ -1050,6 +1057,7 @@ func TestReadOnlyAuthorization(t *testing.T) {
Authenticator
:
getTestTokenAuth
(),
Authorizer
:
a
,
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
transport
:=
http
.
DefaultTransport
...
...
test/integration/framework/master_utils.go
View file @
89c8949e
...
...
@@ -272,6 +272,7 @@ func RunAMaster(t *testing.T) (*master.Master, *httptest.Server) {
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
...
...
test/integration/scheduler_test.go
View file @
89c8949e
...
...
@@ -75,6 +75,7 @@ func TestUnschedulableNodes(t *testing.T) {
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
restClient
:=
client
.
NewOrDie
(
&
client
.
Config
{
Host
:
s
.
URL
,
Version
:
testapi
.
Version
()})
...
...
test/integration/secret_test.go
View file @
89c8949e
...
...
@@ -68,6 +68,7 @@ func TestSecrets(t *testing.T) {
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
framework
.
DeleteAllEtcdKeys
()
...
...
test/integration/service_account_test.go
View file @
89c8949e
...
...
@@ -419,6 +419,7 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config,
Authenticator
:
authenticator
,
Authorizer
:
authorizer
,
AdmissionControl
:
serviceAccountAdmission
,
EnableV1
:
true
,
})
// Start the service account and service account token controllers
...
...
test/integration/utils.go
View file @
89c8949e
...
...
@@ -82,6 +82,7 @@ func runAMaster(t *testing.T) (*master.Master, *httptest.Server) {
APIPrefix
:
"/api"
,
Authorizer
:
apiserver
.
NewAlwaysAllowAuthorizer
(),
AdmissionControl
:
admit
.
NewAlwaysAdmit
(),
EnableV1
:
true
,
})
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
...
...
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