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
0f50fdc5
Unverified
Commit
0f50fdc5
authored
Jan 10, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 10, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71667 from pohly/testfiles-absolute
e2e/framework: absolute test file paths
parents
5647244b
11034773
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
testfiles.go
test/e2e/framework/testfiles/testfiles.go
+9
-2
No files found.
test/e2e/framework/testfiles/testfiles.go
View file @
0f50fdc5
...
...
@@ -129,9 +129,16 @@ type RootFileSource struct {
}
// ReadTestFile looks for the file relative to the configured
// root directory.
// root directory. If the path is already absolute, for example
// in a test that has its own method of determining where
// files are, then the path will be used directly.
func
(
r
RootFileSource
)
ReadTestFile
(
filePath
string
)
([]
byte
,
error
)
{
fullPath
:=
filepath
.
Join
(
r
.
Root
,
filePath
)
var
fullPath
string
if
path
.
IsAbs
(
filePath
)
{
fullPath
=
filePath
}
else
{
fullPath
=
filepath
.
Join
(
r
.
Root
,
filePath
)
}
data
,
err
:=
ioutil
.
ReadFile
(
fullPath
)
if
os
.
IsNotExist
(
err
)
{
// Not an error (yet), some other provider may have the file.
...
...
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