Commit Graph

22 Commits

Author SHA1 Message Date
Victor Agababov c451e3c37f
Various cleanups around the codebase (#1630)
* Various cleanups around the codebase

- unindent the else after return
- make things private that are not used anywhere
- rearrange params
- etc

* add
2020-08-17 19:11:13 -07:00
Scott Nichols 7dec722e26
found another way to get repo name in gh actions (#1622)
* foiund another way to get repo name

* fix vet errors

* did not mean 14
2020-08-14 18:48:06 -07:00
Matt Moore bb91a15b1a
Add Cleanup to our weird test interface. (#1582) 2020-08-04 21:56:28 -07:00
Francesco Guardiani d749843685
Fixed error with #1531 (#1533)
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-07-21 23:38:53 -07:00
Francesco Guardiani 3b7ca76a63
Added logging of port forwarding stdout (#1531)
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-07-21 02:16:35 -07:00
Markus Thömmes c75d324f8b
Code hygiene: Remove unused, use common constructs. (#1320) 2020-05-13 22:20:58 -07:00
Markus Thömmes d29cf98a77
Assorted linting fixes. (#1249)
* Remove unused code.

* Use raw strings to avoid escaping.

* Remove unneeded type conversions.

* Preallocate slices where possible.

* Use semantic equality in psbinding reconciler.
2020-04-28 08:20:51 -07:00
Markus Thömmes c09083a601
Fix a few simple linter warnings: unused code, govet warnings etc. (#1191) 2020-04-06 08:21:20 -07:00
Victor Agababov 14a424af04
Fix the nits leftover from #1118 review (#1124)
Fix the stuff that was not fixed.
2020-02-24 16:43:08 -08:00
coryrc 60e39237f6
Pass verbosity level on to klog (#1118)
* Pass verbosity level on to klog

This was left out of #1022

* Missed capitalization
2020-02-24 13:37:08 -08:00
coryrc a81f50a34e
Backend for improving test logging (#1022)
* Create TLogger, bringing leveled logging to tests

Inspired heavily by go-logr, brings leveled logging to tests while
using the highly reliable zap logger backend to fulfill writing to
multiple log files.

Now that metrics logger has been removed, SetupLoggingFlags() is redundant. Moved to test/logging

* Cleanup TLogger and document

Add TLogger.Collect() to support collecting outcomes (either positive
strings or error types) which will be processed in a subtest upon
completion of the currently-running (sub-)test.

StructuredError prints its output in a more-readable form now.

Call-site should now work for .Log/.Logf-using functions.

Use cancel from NewTLogger instead of t.CleanUp()

Use a zapcore SpewEncoder when writing to testing.T

Means even non-json-encodable structs will get printed to the test log
output, while preserving encodable structured output for other log files.

Removed timestamp from printing to t.Log

* Fix the automatically-detected issues

Spelling, codegen, some coverage (coverage of memory_encoder.go should
not be necessary but the coverage tool is broken and needs to be fixed).

* Increase unit test coverage slightly and fix tiny comment

* Set attribute the way the coverage program wants

* Cleanup based on notes

* Comment cleanup and privitize var

* Mistake; left purposely-failing tests enabled

* Reduce long lines

* Consolidate cleanup code; make variable expressive

* Cleanup and bugfix

Failing functions now tested by having an internal constructor
option to skip calls to t.Fail()/t.FailNow().

Fixed some bugs with internal method errorWithRuntimeCheck and added
tests for it.

Address minor typos from comments.

* Tiny name/optimization fixes
2020-02-19 13:57:05 -08:00
Chi Zhang ac756e07ca remove glog from test/logging (#767) 2019-10-21 12:42:25 -07:00
mattmoor-sockpuppet 1864f499dc golang format tools (#497)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign @mattmoor
2019-06-27 07:37:08 -07:00
Matt Moore 222dd25986 Migrate pkg to use the knative.dev/pkg import path (#489)
* Manual changes.

* scripted changes.
2019-06-26 13:02:06 -07:00
srinivashegde86 2a8c1b0e5a Remove baselogger and use FormatLogger everywhere (#296)
* Remove baselogger and use FormatLogger everywhere

* Fix blank spaces in README

* Fix linting issues

* Fix comment to FormatLogger
2019-02-27 11:29:49 -08:00
mattmoor-sockpuppet 737c4a42f3 golang format tools (#287)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
2019-02-19 07:12:46 -08:00
dushyanthsc ec1c8ea324 Metrics logging fix in pkg/test: Issue-3150 (#279)
* Metrics logging fix in pkg/test: Issue-3150

https://github.com/knative/serving/issues/3150 describes the issue
that currently exists in our test logging framework. This change
fixes the problem by prefixing metrics that needs to be emited by
a constant which the logging.ExpoxtSpan method then uses to identify
the spans that needs to be emitted as logs

Note this only fixes part of the issue:
https://github.com/knative/serving/issues/3150
this change needs to be ported to knative serving before the issue
can be closed.

* Update test/logging/logging.go

Adding required lines.

Co-Authored-By: dushyanthsc <43390008+dushyanthsc@users.noreply.github.com>
2019-02-15 13:36:44 -08:00
Victor Agababov bd5a391c64 fix very annoying logging in the integration tests (#264) 2019-02-07 14:55:40 -08:00
Markus Thömmes 403c2256ff Add timeKey so time is actually logged in e2e tests. (#122)
* Add timeKey so time is actually logged in e2e tests.

* Correct mistake.
2018-10-15 09:06:27 -07:00
Mustafa Demirhan e9a1a3e8c2 Add timestamps to the e2e logs. (#121) 2018-10-09 14:02:26 -07:00
Dave Protasowski 0122abd983 The test logger will now log the correct caller (#63)
Previous, since we weren't skipping, the logged caller
would be 'logging.go'
2018-09-06 14:16:14 -07:00
srinivashegde86 450739d6f8 Add common test logging module (#45)
* Add common test logging module

* Update references to logging lib

* Add error functions
2018-08-20 16:04:59 -07:00