-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(769): various issues with godoc documents #771
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -44,7 +44,7 @@ type KnTest struct { | |||||
kn Kn | ||||||
} | ||||||
|
||||||
// NewIntegrationTest creates a new ItegrationTest object | ||||||
// NewKnTest creates a new KnTest object | ||||||
func NewKnTest() (*KnTest, error) { | ||||||
ns := NextNamespace() | ||||||
|
||||||
|
@@ -68,7 +68,7 @@ func (test *KnTest) Teardown() error { | |||||
return DeleteNamespace(test.namespace) | ||||||
} | ||||||
|
||||||
// Teardown clean up | ||||||
// Kn object used by this KnTest | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
func (test *KnTest) Kn() Kn { | ||||||
return test.kn | ||||||
} | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,9 +107,9 @@ func TestServiceOptions(t *testing.T) { | |
assert.NilError(t, err) | ||
} | ||
serviceCreateWithOptions(t, it, r, "svc6", "--user", strconv.FormatInt(uid, 10)) | ||
validateUserId(t, it, r, "svc6", uid) | ||
validateUserID(t, it, r, "svc6", uid) | ||
serviceUpdate(t, it, r, "svc6", "--user", strconv.FormatInt(uid+1, 10)) | ||
validateUserId(t, it, r, "svc6", uid+1) | ||
validateUserID(t, it, r, "svc6", uid+1) | ||
} | ||
Comment on lines
-110
to
113
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
func serviceCreateWithOptions(t *testing.T, it *test.KnTest, r *test.KnRunResultCollector, serviceName string, options ...string) { | ||
|
@@ -177,7 +177,7 @@ func validateContainerField(t *testing.T, it *test.KnTest, r *test.KnRunResultCo | |
r.AssertNoError(out) | ||
} | ||
|
||
func validateUserId(t *testing.T, it *test.KnTest, r *test.KnRunResultCollector, serviceName string, uid int64) { | ||
func validateUserID(t *testing.T, it *test.KnTest, r *test.KnRunResultCollector, serviceName string, uid int64) { | ||
out := it.Kn().Run("service", "describe", serviceName, "-ojson") | ||
data := json.NewDecoder(strings.NewReader(out.Stdout)) | ||
data.UseNumber() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ func TestSourceApiServer(t *testing.T) { | |
it, err := test.NewKnTest() | ||
assert.NilError(t, err) | ||
defer func() { | ||
err1 := tearDownForSourceApiServer(t, it) | ||
err1 := tearDownForSourceAPIServer(t, it) | ||
err2 := it.Teardown() | ||
assert.NilError(t, err1) | ||
assert.NilError(t, err2) | ||
|
@@ -50,7 +50,7 @@ func TestSourceApiServer(t *testing.T) { | |
r := test.NewKnRunResultCollector(t) | ||
defer r.DumpIfFailed() | ||
|
||
setupForSourceApiServer(t, it) | ||
setupForSourceAPIServer(t, it) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
serviceCreate(t, it, r, "testsvc0") | ||
|
||
t.Log("create apiserver sources with a sink to a service") | ||
|
@@ -103,7 +103,7 @@ func apiServerSourceDelete(t *testing.T, it *test.KnTest, r *test.KnRunResultCol | |
assert.Check(t, util.ContainsAllIgnoreCase(out.Stdout, "apiserver", "source", sourceName, "deleted", "namespace", it.Kn().Namespace())) | ||
} | ||
|
||
func setupForSourceApiServer(t *testing.T, it *test.KnTest) { | ||
func setupForSourceAPIServer(t *testing.T, it *test.KnTest) { | ||
_, err := test.NewKubectl(it.Kn().Namespace()).Run("create", "serviceaccount", testServiceAccount) | ||
assert.NilError(t, err) | ||
|
||
|
@@ -119,7 +119,7 @@ func setupForSourceApiServer(t *testing.T, it *test.KnTest) { | |
assert.NilError(t, err) | ||
} | ||
|
||
func tearDownForSourceApiServer(t *testing.T, it *test.KnTest) error { | ||
func tearDownForSourceAPIServer(t *testing.T, it *test.KnTest) error { | ||
saCmd := []string{"delete", "serviceaccount", testServiceAccount} | ||
_, err := test.NewKubectl(it.Kn().Namespace()).Run(saCmd...) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.