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
d3244afc
Commit
d3244afc
authored
Jun 06, 2018
by
hangaoshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused code in runtime/scheme_test.go
parent
ad9722c4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
18 deletions
+0
-18
BUILD
staging/src/k8s.io/apimachinery/pkg/runtime/BUILD
+0
-2
scheme_test.go
staging/src/k8s.io/apimachinery/pkg/runtime/scheme_test.go
+0
-16
No files found.
staging/src/k8s.io/apimachinery/pkg/runtime/BUILD
View file @
d3244afc
...
@@ -65,8 +65,6 @@ go_test(
...
@@ -65,8 +65,6 @@ go_test(
"scheme_test.go",
"scheme_test.go",
],
],
deps = [
deps = [
"//vendor/github.com/google/gofuzz:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/github.com/stretchr/testify/assert:go_default_library",
"//vendor/github.com/stretchr/testify/assert:go_default_library",
"//vendor/github.com/stretchr/testify/require:go_default_library",
"//vendor/github.com/stretchr/testify/require:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
...
...
staging/src/k8s.io/apimachinery/pkg/runtime/scheme_test.go
View file @
d3244afc
...
@@ -22,9 +22,6 @@ import (
...
@@ -22,9 +22,6 @@ import (
"strings"
"strings"
"testing"
"testing"
"github.com/google/gofuzz"
flag
"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/schema"
...
@@ -33,8 +30,6 @@ import (
...
@@ -33,8 +30,6 @@ import (
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/diff"
)
)
var
fuzzIters
=
flag
.
Int
(
"fuzz-iters"
,
50
,
"How many fuzzing iterations to do."
)
func
TestScheme
(
t
*
testing
.
T
)
{
func
TestScheme
(
t
*
testing
.
T
)
{
internalGV
:=
schema
.
GroupVersion
{
Group
:
"test.group"
,
Version
:
runtime
.
APIVersionInternal
}
internalGV
:=
schema
.
GroupVersion
{
Group
:
"test.group"
,
Version
:
runtime
.
APIVersionInternal
}
internalGVK
:=
internalGV
.
WithKind
(
"Simple"
)
internalGVK
:=
internalGV
.
WithKind
(
"Simple"
)
...
@@ -460,17 +455,6 @@ func TestUnversionedTypes(t *testing.T) {
...
@@ -460,17 +455,6 @@ func TestUnversionedTypes(t *testing.T) {
}
}
}
}
// TestObjectFuzzer can randomly populate all the above objects.
var
TestObjectFuzzer
=
fuzz
.
New
()
.
NilChance
(
.5
)
.
NumElements
(
1
,
100
)
.
Funcs
(
func
(
j
*
runtimetesting
.
MyWeirdCustomEmbeddedVersionKindField
,
c
fuzz
.
Continue
)
{
// We have to customize the randomization of MyWeirdCustomEmbeddedVersionKindFields because their
// APIVersion and Kind must remain blank in memory.
j
.
APIVersion
=
""
j
.
ObjectKind
=
""
j
.
ID
=
c
.
RandString
()
},
)
// Returns a new Scheme set up with the test objects.
// Returns a new Scheme set up with the test objects.
func
GetTestScheme
()
*
runtime
.
Scheme
{
func
GetTestScheme
()
*
runtime
.
Scheme
{
internalGV
:=
schema
.
GroupVersion
{
Version
:
runtime
.
APIVersionInternal
}
internalGV
:=
schema
.
GroupVersion
{
Version
:
runtime
.
APIVersionInternal
}
...
...
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