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

Consistently use github.com/stretchr/testify/require #2639

Closed
ainar-g opened this issue Feb 4, 2021 · 0 comments
Closed

Consistently use github.com/stretchr/testify/require #2639

ainar-g opened this issue Feb 4, 2021 · 0 comments
Assignees
Milestone

Comments

@ainar-g
Copy link
Contributor

ainar-g commented Feb 4, 2021

Instead of writing:

if !assert.Equal(t, want, got) {
        return
}

We should probably just write:

require.Equal(t, want, got)

This will stop the test if want is not equal to got, which is probably what we want in most cases.

@ainar-g ainar-g added this to the v0.106.0 milestone Feb 4, 2021
adguard pushed a commit that referenced this issue Feb 9, 2021
Merge in DNS/adguard-home from 2639-testify-require-1 to master

Updates #2639.

Squashed commit of the following:

commit da7d283
Merge: c4af71b 63e4adc
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 14:27:41 2021 +0300

    Merge branch 'master' into 2639-testify-require-1

commit c4af71b
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Feb 8 19:32:51 2021 +0300

    querylog: fix tests for windows

commit b616ea5
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Feb 8 18:29:28 2021 +0300

    querylog: imp tests again

commit 091a698
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Feb 8 15:49:38 2021 +0300

    querylog: imp tests
adguard pushed a commit that referenced this issue Feb 9, 2021
Merge in DNS/adguard-home from imp-upgrade-test to master

Updates #2639.
Updates #2646.

Squashed commit of the following:

commit f7bd8e0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Feb 9 16:38:40 2021 +0300

    home: imp test more

commit 5b64131
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Feb 9 16:09:22 2021 +0300

    home: imp upgrade test
adguard pushed a commit that referenced this issue Feb 9, 2021
Merge in DNS/adguard-home from 2639-testify-require-2 to master

Updates #2639.

Squashed commit of the following:

commit 31cc29a
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 18:48:31 2021 +0300

    all: deal with t.Run

commit 484f477
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 17:44:02 2021 +0300

    all: fix readability, imp tests

commit 1231a82
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 16:06:29 2021 +0300

    all: imp tests
adguard pushed a commit that referenced this issue Feb 12, 2021
Merge in DNS/adguard-home from 2639-testify-require-3 to master

Updates #2639.

Squashed commit of the following:

commit 83d7afc
Merge: ef154b6 e83b919
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Feb 12 13:07:58 2021 +0300

    Merge branch 'master' into 2639-testify-require-3

commit ef154b6
Merge: 5b46073 2eb21ef
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Feb 12 12:40:43 2021 +0300

    Merge branch 'master' into 2639-testify-require-3

commit 5b46073
Merge: 7dd7b6e 890f032
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Feb 10 21:20:51 2021 +0300

    Merge branch 'master' into 2639-testify-require-3

commit 7dd7b6e
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Feb 10 21:19:36 2021 +0300

    dhcpd: fix comment

commit 9e74adb
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Feb 10 15:13:40 2021 +0300

    all: imp tests drastically
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 2639-testify-require-1 to master

Updates AdguardTeam#2639.

Squashed commit of the following:

commit da7d283
Merge: c4af71b 63e4adc
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 14:27:41 2021 +0300

    Merge branch 'master' into 2639-testify-require-1

commit c4af71b
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Feb 8 19:32:51 2021 +0300

    querylog: fix tests for windows

commit b616ea5
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Feb 8 18:29:28 2021 +0300

    querylog: imp tests again

commit 091a698
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Feb 8 15:49:38 2021 +0300

    querylog: imp tests
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from imp-upgrade-test to master

Updates AdguardTeam#2639.
Updates AdguardTeam#2646.

Squashed commit of the following:

commit f7bd8e0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Feb 9 16:38:40 2021 +0300

    home: imp test more

commit 5b64131
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Feb 9 16:09:22 2021 +0300

    home: imp upgrade test
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 2639-testify-require-2 to master

Updates AdguardTeam#2639.

Squashed commit of the following:

commit 31cc29a
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 18:48:31 2021 +0300

    all: deal with t.Run

commit 484f477
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 17:44:02 2021 +0300

    all: fix readability, imp tests

commit 1231a82
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Feb 9 16:06:29 2021 +0300

    all: imp tests
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 2639-testify-require-3 to master

Updates AdguardTeam#2639.

Squashed commit of the following:

commit 83d7afc
Merge: ef154b6 e83b919
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Feb 12 13:07:58 2021 +0300

    Merge branch 'master' into 2639-testify-require-3

commit ef154b6
Merge: 5b46073 2eb21ef
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Feb 12 12:40:43 2021 +0300

    Merge branch 'master' into 2639-testify-require-3

commit 5b46073
Merge: 7dd7b6e 890f032
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Feb 10 21:20:51 2021 +0300

    Merge branch 'master' into 2639-testify-require-3

commit 7dd7b6e
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Feb 10 21:19:36 2021 +0300

    dhcpd: fix comment

commit 9e74adb
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Feb 10 15:13:40 2021 +0300

    all: imp tests drastically
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 2639-testify-require-4 to master

Closes AdguardTeam#2639.

Squashed commit of the following:

commit 0bb9125
Merge: 0e9e9ed 2c9992e
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Thu Mar 11 15:47:21 2021 +0300

    Merge branch 'master' into 2639-testify-require-4

commit 0e9e9ed
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Mar 10 12:43:15 2021 +0300

    home: rm deletion error check

commit 6bfbbcd
Merge: c8ebe54 8811c88
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Mar 10 12:30:07 2021 +0300

    Merge branch 'master' into 2639-testify-require-4

commit c8ebe54
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Mar 10 12:28:43 2021 +0300

    home: imp tests

commit f0e1db4
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Mar 5 14:06:41 2021 +0300

    dnsforward: imp tests

commit 4528246
Merge: 54b08d9 90ebc4d
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Thu Mar 4 18:17:52 2021 +0300

    Merge branch 'master' into 2639-testify-require-4

commit 54b08d9
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Thu Feb 11 13:17:05 2021 +0300

    dnsfilter: imp tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants