Closed khrm closed 1 year ago
/assign @avinal
@khrm: GitHub didn't allow me to assign the following users: avinal.
Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide
@enarha @sayan-biswas Please review and merge this.
The change breaks the tests.
[ tmp] -> cd results/tools/tkn-results/
[ tkn-results] -> go test ./...
? github.com/tektoncd/results/tools/tkn-results [no test files]
? github.com/tektoncd/results/tools/tkn-results/cmd/records [no test files]
? github.com/tektoncd/results/tools/tkn-results/docs [no test files]
? github.com/tektoncd/results/tools/tkn-results/internal/flags [no test files]
? github.com/tektoncd/results/tools/tkn-results/internal/format [no test files]
? github.com/tektoncd/results/tools/tkn-results/internal/portforward [no test files]
ok github.com/tektoncd/results/tools/tkn-results/cmd 0.013s
ok github.com/tektoncd/results/tools/tkn-results/internal/client 0.034s
--- FAIL: TestParseFileConfig (0.00s)
config_test.go:63: (*config.Config)(
- nil,
+ &{
+ Address: "a",
+ Token: "b",
+ ServiceAccount: &config.ServiceAccount{Namespace: "e", Name: "f"},
+ SSL: config.SSLConfig{RootsFilePath: "c", ServerNameOverride: "d"},
+ },
)
--- FAIL: TestEnvVarConfig (0.00s)
config_test.go:63: (*config.Config)(
- nil,
+ &{SSL: config.SSLConfig{RootsFilePath: "a", ServerNameOverride: "b"}},
)
--- FAIL: TestFlagConfig (0.00s)
config_test.go:63: (*config.Config)(
- nil,
+ &{
+ Address: "1",
+ Token: "2",
+ ServiceAccount: &config.ServiceAccount{Namespace: "e", Name: "f"},
+ SSL: config.SSLConfig{RootsFilePath: "c", ServerNameOverride: "d"},
+ },
)
FAIL
FAIL github.com/tektoncd/results/tools/tkn-results/internal/config 0.003s
FAIL
It seems previous tests were wrong. That's expected values.
OK. Fixed the tests.
@enarha @sayan-biswas Can you please review this and then merge?
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: avinal, sayan-biswas
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/lgtm
tkn-result was receiving the empty value from the commandline. This fixes that by initializing after flags are set.
Fixes: #582
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes