-
Notifications
You must be signed in to change notification settings - Fork 0
Add Match test #51
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
Add Match test #51
Conversation
|
You should cleanup the TempDir, that you have created after the test has run |
pkg/pair/match_test.go
Outdated
| csvReader := csv.NewReader(f) | ||
| records, err := csvReader.ReadAll() | ||
| require.NoError(t, err, "must read csv data") | ||
| require.Len(t, records, 800, "must contain 100 emails") |
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.
| require.Len(t, records, 800, "must contain 100 emails") | |
| require.Len(t, records, 800, "must contain 800 emails") |
|
|
||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
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.
const (
commonStart int 100
commonEnd int 900
nEmails int 1001
)
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.
please use some constants instead
| _, exists := expectContain[line[0]] | ||
| require.True(t, exists, "must exist in the hash-encrypted list") |
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.
| _, exists := expectContain[line[0]] | |
| require.True(t, exists, "must exist in the hash-encrypted list") | |
| _, exists := expectContain[line[0]] | |
| require.True(t, exists, "must exist in the hash-encrypted list") | |
| delete(expectContain, line[0]) |
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.
You don't want the same ID matching over and over again.
| _, exists := expectContain[line[0]] | ||
| require.True(t, exists, "must exist in the hash-encrypted list") |
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.
| _, exists := expectContain[line[0]] | |
| require.True(t, exists, "must exist in the hash-encrypted list") | |
| _, exists := expectContain[line[0]] | |
| require.True(t, exists, "must exist in the hash-encrypted list") | |
| delete(expectContain, line[0]) |
No description provided.