@@ -43,6 +43,9 @@ func TestSnapshotDoesNotExistNotInCI(t *testing.T) {
43
43
44
44
func TestSnapshotDoesNotExistInCI (t * testing.T ) {
45
45
withIsolatedWorkingDir (t )
46
+ // Ensure that UPDATE_TOOLSNAPS is not set for this test, which it might be if someone is running
47
+ // UPDATE_TOOLSNAPS=true go test ./...
48
+ t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
46
49
47
50
// Given we are running in CI
48
51
t .Setenv ("GITHUB_ACTIONS" , "true" )
@@ -74,6 +77,9 @@ func TestSnapshotExistsMatch(t *testing.T) {
74
77
75
78
func TestSnapshotExistsDiff (t * testing.T ) {
76
79
withIsolatedWorkingDir (t )
80
+ // Ensure that UPDATE_TOOLSNAPS is not set for this test, which it might be if someone is running
81
+ // UPDATE_TOOLSNAPS=true go test ./...
82
+ t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
77
83
78
84
// Given a non-matching snapshot file exists
79
85
require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
@@ -109,6 +115,9 @@ func TestUpdateToolsnaps(t *testing.T) {
109
115
110
116
func TestMalformedSnapshotJSON (t * testing.T ) {
111
117
withIsolatedWorkingDir (t )
118
+ // Ensure that UPDATE_TOOLSNAPS is not set for this test, which it might be if someone is running
119
+ // UPDATE_TOOLSNAPS=true go test ./...
120
+ t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
112
121
113
122
// Given a malformed snapshot file exists
114
123
require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
0 commit comments