Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3cc8e5

Browse files
authored
chore: set timezone on all golden file make targets (#17533)
We replace timestamps in our golden files to keep the values constant.However, if a non-UTC timezone is used then the timestamp will still bereplaced but the whitespace will be messed up (since it was aligned tothe original value).![image](https://github.com/user-attachments/assets/b7ebf615-5b41-41bb-8939-682a45a61952)Therefore we must force a timezone when generating golden files.Signed-off-by: Danny Kopping <dannykopping@gmail.com>
1 parent35553a5 commitb3cc8e5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -834,39 +834,39 @@ clean/golden-files:
834834
.PHONY: clean/golden-files
835835

836836
cli/testdata/.gen-golden:$(wildcard cli/testdata/*.golden)$(wildcard cli/*.tpl)$(GO_SRC_FILES)$(wildcard cli/*_test.go)
837-
gotest ./cli -run="Test(CommandHelp|ServerYAML|ErrorExamples|.*Golden)" -update
837+
TZ=UTCgotest ./cli -run="Test(CommandHelp|ServerYAML|ErrorExamples|.*Golden)" -update
838838
touch"$@"
839839

840840
enterprise/cli/testdata/.gen-golden:$(wildcard enterprise/cli/testdata/*.golden)$(wildcard cli/*.tpl)$(GO_SRC_FILES)$(wildcard enterprise/cli/*_test.go)
841-
gotest ./enterprise/cli -run="TestEnterpriseCommandHelp" -update
841+
TZ=UTCgotest ./enterprise/cli -run="TestEnterpriseCommandHelp" -update
842842
touch"$@"
843843

844844
tailnet/testdata/.gen-golden:$(wildcard tailnet/testdata/*.golden.html)$(GO_SRC_FILES)$(wildcard tailnet/*_test.go)
845-
gotest ./tailnet -run="TestDebugTemplate" -update
845+
TZ=UTCgotest ./tailnet -run="TestDebugTemplate" -update
846846
touch"$@"
847847

848848
enterprise/tailnet/testdata/.gen-golden:$(wildcard enterprise/tailnet/testdata/*.golden.html)$(GO_SRC_FILES)$(wildcard enterprise/tailnet/*_test.go)
849-
gotest ./enterprise/tailnet -run="TestDebugTemplate" -update
849+
TZ=UTCgotest ./enterprise/tailnet -run="TestDebugTemplate" -update
850850
touch"$@"
851851

852852
helm/coder/tests/testdata/.gen-golden:$(wildcard helm/coder/tests/testdata/*.yaml)$(wildcard helm/coder/tests/testdata/*.golden)$(GO_SRC_FILES)$(wildcard helm/coder/tests/*_test.go)
853-
gotest ./helm/coder/tests -run=TestUpdateGoldenFiles -update
853+
TZ=UTCgotest ./helm/coder/tests -run=TestUpdateGoldenFiles -update
854854
touch"$@"
855855

856856
helm/provisioner/tests/testdata/.gen-golden:$(wildcard helm/provisioner/tests/testdata/*.yaml)$(wildcard helm/provisioner/tests/testdata/*.golden)$(GO_SRC_FILES)$(wildcard helm/provisioner/tests/*_test.go)
857-
gotest ./helm/provisioner/tests -run=TestUpdateGoldenFiles -update
857+
TZ=UTCgotest ./helm/provisioner/tests -run=TestUpdateGoldenFiles -update
858858
touch"$@"
859859

860860
coderd/.gen-golden:$(wildcard coderd/testdata/*/*.golden)$(GO_SRC_FILES)$(wildcard coderd/*_test.go)
861-
gotest ./coderd -run="Test.*Golden$$" -update
861+
TZ=UTCgotest ./coderd -run="Test.*Golden$$" -update
862862
touch"$@"
863863

864864
coderd/notifications/.gen-golden:$(wildcard coderd/notifications/testdata/*/*.golden)$(GO_SRC_FILES)$(wildcard coderd/notifications/*_test.go)
865-
gotest ./coderd/notifications -run="Test.*Golden$$" -update
865+
TZ=UTCgotest ./coderd/notifications -run="Test.*Golden$$" -update
866866
touch"$@"
867867

868868
provisioner/terraform/testdata/.gen-golden:$(wildcard provisioner/terraform/testdata/*/*.golden)$(GO_SRC_FILES)$(wildcard provisioner/terraform/*_test.go)
869-
gotest ./provisioner/terraform -run="Test.*Golden$$" -update
869+
TZ=UTCgotest ./provisioner/terraform -run="Test.*Golden$$" -update
870870
touch"$@"
871871

872872
provisioner/terraform/testdata/version:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp