Skip to content
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

cmd package test improvements #258

Merged
merged 33 commits into from
Dec 7, 2023
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7c3f0a8
cmd package test improvements
shireenf-ibm Oct 31, 2023
dc942c6
tiny fix
shireenf-ibm Oct 31, 2023
212d606
Merge branch 'main' into issue_110_tests_improvements_cmd_pkg
shireenf-ibm Oct 31, 2023
a667626
Merge branch 'main' of github.com:np-guard/netpol-analyzer into issue…
shireenf-ibm Nov 9, 2023
ebcdfa9
Merge branch 'main' into issue_110_tests_improvements_cmd_pkg
shireenf-ibm Nov 9, 2023
486b3bf
comment-out a test with json format since its output file cause other…
shireenf-ibm Nov 9, 2023
7414779
merge with master
shireenf-ibm Nov 9, 2023
22fb7c3
Merge branch 'issue_110_tests_improvements_cmd_pkg' of github.com:np-…
shireenf-ibm Nov 9, 2023
f8be434
Merge branch 'main' of github.com:np-guard/netpol-analyzer into issue…
shireenf-ibm Nov 9, 2023
ebc8e39
Merge branch 'main' into issue_110_tests_improvements_cmd_pkg
shireenf-ibm Nov 9, 2023
5b20ddb
Merge branch 'main' into issue_110_tests_improvements_cmd_pkg
shireenf-ibm Nov 12, 2023
d8f0639
Merge branch 'main' into issue_110_tests_improvements_cmd_pkg
shireenf-ibm Nov 13, 2023
8519e81
Merge branch 'main' of github.com:np-guard/netpol-analyzer into issue…
shireenf-ibm Nov 16, 2023
e2fe5d2
remove dups
shireenf-ibm Nov 19, 2023
f20ee2b
handling case of json output which can not be saved under its test dir
shireenf-ibm Nov 19, 2023
8757a78
adding cli test `command_test` to the make test-update
shireenf-ibm Nov 19, 2023
b8c98ad
Merge branch 'main' into issue_110_tests_improvements_cmd_pkg
shireenf-ibm Nov 20, 2023
6587c5c
running make test-update after merge
shireenf-ibm Nov 20, 2023
2cea8d7
code updates
shireenf-ibm Nov 23, 2023
4a4bcab
generating new output files by running make test-update
shireenf-ibm Nov 23, 2023
d605524
remove old output files
shireenf-ibm Nov 23, 2023
9c72618
remove cli output dir (not needed anymore)
shireenf-ibm Nov 23, 2023
58d7f14
fixes
shireenf-ibm Dec 3, 2023
871ecfa
Update pkg/internal/testutils/testutils.go
shireenf-ibm Dec 6, 2023
32f4dde
fixes
shireenf-ibm Dec 6, 2023
412e405
fix lint err
shireenf-ibm Dec 6, 2023
ba4346c
fix
shireenf-ibm Dec 6, 2023
dcd4357
merge master
shireenf-ibm Dec 6, 2023
a2ee0e2
Merge branch 'main' of github.com:np-guard/netpol-analyzer into issue…
shireenf-ibm Dec 6, 2023
601291e
empty format handle
shireenf-ibm Dec 6, 2023
9775afd
fixing diff testName issue
shireenf-ibm Dec 7, 2023
971f844
moving output to a new dir
shireenf-ibm Dec 7, 2023
f3ed640
pkges depth and get tests dir
shireenf-ibm Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
empty format handle
shireenf-ibm committed Dec 6, 2023
commit 601291e66a1bae7ae00950a025744db357117a7b
3 changes: 2 additions & 1 deletion pkg/internal/testutils/testutils.go
Original file line number Diff line number Diff line change
@@ -61,10 +61,11 @@ func ConnlistTestNameByTestArgs(dirName, focusWorkload, format string) (testName
func DiffTestNameByTestArgs(ref1, ref2, format string) (testName, expectedOutputFileName string) {
namePrefix := "diff_between_" + ref2 + "_and_" + ref1
testName = namePrefix
expectedOutputFileName = "" // if the format is empty, file name is unused
if format != "" {
testName += formatStr + format
expectedOutputFileName = namePrefix + dotSign + format
}
expectedOutputFileName = namePrefix + dotSign + format
return testName, expectedOutputFileName
}