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
a0ef44b7
Commit
a0ef44b7
authored
Nov 09, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16676 from jbeda/e2e-fixes
Auto commit by PR queue bot
parents
a436da79
89872777
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
kubectl.go
test/e2e/kubectl.go
+33
-3
serviceloadbalancers.go
test/e2e/serviceloadbalancers.go
+4
-4
No files found.
test/e2e/kubectl.go
View file @
a0ef44b7
...
...
@@ -211,10 +211,9 @@ var _ = Describe("Kubectl client", func() {
// Build the static kubectl
By
(
"Finding a static kubectl for upload"
)
testStaticKubectlPath
:=
path
.
Join
(
testContext
.
RepoRoot
,
"platforms/linux/386/kubectl"
)
_
,
err
=
os
.
Stat
(
testStaticKubectlPath
)
testStaticKubectlPath
,
err
:=
findBinary
(
"kubectl"
,
"linux/386"
)
if
err
!=
nil
{
Logf
(
"No kubectl
in %s. Attempting a local build..."
,
testStaticKubectlPath
)
Logf
(
"No kubectl
found: %v.
\n
Attempting a local build..."
,
err
)
// Fall back to trying to build a local static kubectl
kubectlContainerPath
:=
path
.
Join
(
testContext
.
RepoRoot
,
"/examples/kubectl-container/"
)
if
_
,
err
:=
os
.
Stat
(
path
.
Join
(
testContext
.
RepoRoot
,
"hack/build-go.sh"
));
err
!=
nil
{
...
...
@@ -1201,3 +1200,34 @@ func streamingUpload(file *os.File, fileName string, postBodyWriter *multipart.W
Failf
(
"Unable to close the writer for file upload. Error: %s"
,
err
)
}
}
var
binPrefixes
=
[]
string
{
"_output/dockerized/bin"
,
"_output/local/bin"
,
"platforms"
,
}
// findBinary searches through likely paths to find the specified binary. It
// takes the one that has been built most recently. Platform should be
// specified as '<os>/<arch>'. For example: 'linux/amd64'.
func
findBinary
(
binName
string
,
platform
string
)
(
string
,
error
)
{
var
binTime
time
.
Time
var
binPath
string
for
_
,
pre
:=
range
binPrefixes
{
tryPath
:=
path
.
Join
(
testContext
.
RepoRoot
,
pre
,
platform
,
binName
)
fi
,
err
:=
os
.
Stat
(
tryPath
)
if
err
!=
nil
{
continue
}
if
fi
.
ModTime
()
.
After
(
binTime
)
{
binPath
=
tryPath
binTime
=
fi
.
ModTime
()
}
}
if
len
(
binPath
)
>
0
{
return
binPath
,
nil
}
return
binPath
,
fmt
.
Errorf
(
"Could not find %v for %v"
,
binName
,
platform
)
}
test/e2e/serviceloadbalancers.go
View file @
a0ef44b7
...
...
@@ -88,7 +88,7 @@ func (h *haproxyControllerTester) start(namespace string) (err error) {
// Create a replication controller with the given configuration.
rc
:=
rcFromManifest
(
h
.
cfg
)
rc
.
Namespace
=
namespace
rc
.
Spec
.
Template
.
Labels
[
"
rcN
ame"
]
=
rc
.
Name
rc
.
Spec
.
Template
.
Labels
[
"
n
ame"
]
=
rc
.
Name
// Add the --namespace arg.
// TODO: Remove this when we have proper namespace support.
...
...
@@ -102,7 +102,7 @@ func (h *haproxyControllerTester) start(namespace string) (err error) {
if
err
!=
nil
{
return
}
if
err
=
waitForRCPodsRunning
(
h
.
client
,
namespace
,
h
.
rc
Name
);
err
!=
nil
{
if
err
=
waitForRCPodsRunning
(
h
.
client
,
namespace
,
rc
.
Name
);
err
!=
nil
{
return
}
h
.
rcName
=
rc
.
Name
...
...
@@ -110,7 +110,7 @@ func (h *haproxyControllerTester) start(namespace string) (err error) {
// Find the pods of the rc we just created.
labelSelector
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"
rcN
ame"
:
h
.
rcName
}))
labels
.
Set
(
map
[
string
]
string
{
"
n
ame"
:
h
.
rcName
}))
pods
,
err
:=
h
.
client
.
Pods
(
h
.
rcNamespace
)
.
List
(
labelSelector
,
fields
.
Everything
())
if
err
!=
nil
{
...
...
@@ -164,7 +164,7 @@ func (s *ingManager) start(namespace string) (err error) {
for
_
,
rcPath
:=
range
s
.
rcCfgPaths
{
rc
:=
rcFromManifest
(
rcPath
)
rc
.
Namespace
=
namespace
rc
.
Spec
.
Template
.
Labels
[
"
rcN
ame"
]
=
rc
.
Name
rc
.
Spec
.
Template
.
Labels
[
"
n
ame"
]
=
rc
.
Name
rc
,
err
=
s
.
client
.
ReplicationControllers
(
rc
.
Namespace
)
.
Create
(
rc
)
if
err
!=
nil
{
return
...
...
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