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

Revert some changes #223

Merged
merged 1 commit into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else
- DEL /F /Q cover output
endif

run = .
run = .

# count says how many times to run the tests.
count = 1
Expand Down Expand Up @@ -85,7 +85,7 @@ ifneq ("$(OS)","Windows_NT")
endif

# Define docker container name our test MongoDB instance.
MONGO_TEST_CONTAINER_NAME=blocker-mongo-test-db
MONGO_TEST_CONTAINER_NAME=accounts-mongo-test-db

# start-mongo starts a local mongoDB container with no persistence.
# We first prepare for the start of the container by making sure the test
Expand Down Expand Up @@ -136,11 +136,6 @@ test-long-ci:
@mkdir -p cover
GORACE='$(racevars)' go test -race --coverprofile='./cover/cover.out' -v -failfast -tags='testing debug netgo' -timeout=600s $(pkgs) -run=$(run) -count=$(count)

# Cookie vars
# TODO: Are these used?
COOKIE_HASH_KEY="7eb32cfab5014d14394648dae1cf4e606727eee2267f6a50213cd842e61c5bce"
COOKIE_ENC_KEY="65d31d12b80fc57df16d84c02a9bb62e2bc3b633388b05e49ef8abfdf0d35cf3"

ro-tex marked this conversation as resolved.
Show resolved Hide resolved
# docker-generate is a docker command for env var generation
#
# The sleep is to allow time for the docker container to start up after `docker
Expand Down
2 changes: 1 addition & 1 deletion api/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestUserLimitsGetFromTier(t *testing.T) {
}
}()
// The call that we expect to log a critical.
_ = userLimitsGetFromTier("", math.MaxInt64, false, true)
_ = userLimitsGetFromTier("", math.MaxInt, false, true)
ro-tex marked this conversation as resolved.
Show resolved Hide resolved
return
}()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions build/debug_off.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

package build
Expand Down
1 change: 1 addition & 0 deletions build/debug_on.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build debug
// +build debug

package build
Expand Down
1 change: 1 addition & 0 deletions build/release_dev.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build dev
// +build dev

package build
Expand Down
1 change: 1 addition & 0 deletions build/release_standard.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !testing && !dev
// +build !testing,!dev

package build
Expand Down
1 change: 1 addition & 0 deletions build/release_testing.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build testing
// +build testing

package build
Expand Down
5 changes: 3 additions & 2 deletions types/email_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
func TestEmail_String(t *testing.T) {
s := "mIxEdCaSeStRiNg"
e := Email(s)
if !strings.EqualFold(e.String(), s) {
// We want to directly compare the strings in a case-sensitive way.
if e.String() != strings.ToLower(s) {
t.Fatalf("Expected '%s', got '%s'", strings.ToLower(s), e)
}
}
Expand Down Expand Up @@ -44,7 +45,7 @@ func TestEmail_UnmarshalJSON(t *testing.T) {
t.Fatal(err)
}
// We expect the unmarshalled email to be lowercase only.
if !strings.EqualFold(string(e), string(b[1:len(b)-1])) {
if string(e) != strings.ToLower(string(b[1:len(b)-1])) {
t.Fatalf("Expected to get a lowercase version of '%s', i.e. '%s' but got '%s'", e, strings.ToLower(string(e)), e)
}
}