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
2fb859db
Commit
2fb859db
authored
Apr 20, 2019
by
aaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shellcheck failures on
update pull request update pull request
parent
ea38af74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
.shellcheck_failures
hack/.shellcheck_failures
+0
-1
ginkgo-e2e.sh
hack/ginkgo-e2e.sh
+14
-11
No files found.
hack/.shellcheck_failures
View file @
2fb859db
...
...
@@ -20,7 +20,6 @@
./cluster/restore-from-backup.sh
./cluster/test-e2e.sh
./cluster/validate-cluster.sh
./hack/ginkgo-e2e.sh
./hack/lib/init.sh
./hack/lib/swagger.sh
./hack/lib/test.sh
...
...
hack/ginkgo-e2e.sh
View file @
2fb859db
...
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
source
"
${
KUBE_ROOT
}
/cluster/common.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
...
...
@@ -38,8 +38,8 @@ GINKGO_NO_COLOR=${GINKGO_NO_COLOR:-n}
# If 'y', will rerun failed tests once to give them a second chance.
GINKGO_TOLERATE_FLAKES
=
${
GINKGO_TOLERATE_FLAKES
:-
n
}
:
${
KUBECTL
:
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
}
:
${
KUBE_CONFIG_FILE
:
=
"config-test.sh"
}
:
"
${
KUBECTL
:
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
}
"
:
"
${
KUBE_CONFIG_FILE
:
=
"config-test.sh"
}
"
export
KUBECTL KUBE_CONFIG_FILE
...
...
@@ -48,11 +48,13 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
function
detect-master-from-kubeconfig
()
{
export
KUBECONFIG
=
${
KUBECONFIG
:-
$DEFAULT_KUBECONFIG
}
local
cc
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.current-context}"
)
if
[[
!
-z
"
${
KUBE_CONTEXT
:-}
"
]]
;
then
local
cc
cc
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.current-context}"
)
if
[[
-n
"
${
KUBE_CONTEXT
:-}
"
]]
;
then
cc
=
"
${
KUBE_CONTEXT
}
"
fi
local
cluster
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.contexts[?(@.name ==
\"
${
cc
}
\"
)].context.cluster}"
)
local
cluster
cluster
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.contexts[?(@.name ==
\"
${
cc
}
\"
)].context.cluster}"
)
KUBE_MASTER_URL
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.clusters[?(@.name ==
\"
${
cluster
}
\"
)].cluster.server}"
)
}
...
...
@@ -86,8 +88,8 @@ fi
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
;
then
set_num_migs
NODE_INSTANCE_GROUP
=
""
for
((
i
=
1
;
i<
=
${
NUM_MIGS
}
;
i++
))
;
do
if
[[
${
i
}
==
${
NUM_MIGS
}
]]
;
then
for
((
i
=
1
;
i<
=
NUM_MIGS
;
i++
))
;
do
if
[[
${
i
}
==
"
${
NUM_MIGS
}
"
]]
;
then
# We are assigning the same mig names as create-nodes function from cluster/gce/util.sh.
NODE_INSTANCE_GROUP
=
"
${
NODE_INSTANCE_GROUP
}${
NODE_INSTANCE_PREFIX
}
-group"
else
...
...
@@ -101,7 +103,7 @@ fi
# KUBERNETES_CONFORMANCE_PROVIDER is set to "gke".
if
[[
-z
"
${
NODE_INSTANCE_GROUP
:-}
"
]]
&&
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gke"
]]
;
then
detect-node-instance-groups
NODE_INSTANCE_GROUP
=
$(
kube::util::join ,
"
${
NODE_INSTANCE_GROUP
S
[@]
}
"
)
NODE_INSTANCE_GROUP
=
$(
kube::util::join ,
"
${
NODE_INSTANCE_GROUP
[@]
}
"
)
fi
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"azure"
]]
;
then
...
...
@@ -138,8 +140,9 @@ fi
# The --host setting is used only when providing --auth_config
# If --kubeconfig is used, the host to use is retrieved from the .kubeconfig
# file and the one provided with --host is ignored.
# Add path for things like running kubectl binary.
export
PATH
=
$(
dirname
"
${
e2e_test
}
"
)
:
"
${
PATH
}
"
# Add path for things like running kubectl binary.
PATH
=
$(
dirname
"
${
e2e_test
}
"
)
:
"
${
PATH
}
"
export
PATH
"
${
ginkgo
}
"
"
${
ginkgo_args
[@]
:+
${
ginkgo_args
[@]
}}
"
"
${
e2e_test
}
"
--
\
"
${
auth_config
[@]
:+
${
auth_config
[@]
}}
"
\
--ginkgo
.flakeAttempts
=
"
${
FLAKE_ATTEMPTS
}
"
\
...
...
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